From abb117303970ba1c055df3278fdaf917034232d2 Mon Sep 17 00:00:00 2001 From: Jake 'Sid' Smith Date: Thu, 28 Jan 2021 11:48:52 +0000 Subject: [PATCH 1/2] Set babel source type to "unambiguous" This will parse any modules that do not have import/export statements as "scripts", and will avoid the below error when a strict script file assigns to module.exports "Assignment to read-only properties is not allowed in strict mode" --- src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.js b/src/index.js index 12bdea3..8ca5157 100644 --- a/src/index.js +++ b/src/index.js @@ -213,6 +213,7 @@ function createWebpackConfig(options) { babelrc: false, presets: BABEL_BASE_PRESETS, plugins: BABEL_BASE_PLUGINS, + sourceType: 'unambiguous', }, }, ], @@ -227,6 +228,7 @@ function createWebpackConfig(options) { babelrc: false, presets: BABEL_TYPESCRIPT_PRESETS, plugins: BABEL_TYPESCRIPT_PLUGINS, + sourceType: 'unambiguous', }, }, ], From 803a6d9625292af165cfee6c493e7f5cb1400ea1 Mon Sep 17 00:00:00 2001 From: Jake 'Sid' Smith Date: Thu, 28 Jan 2021 11:51:39 +0000 Subject: [PATCH 2/2] 0.3.3 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index ab19a19..187f382 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@dabapps/create-webpack-config", - "version": "0.3.2", + "version": "0.3.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index fe30455..c332aaa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dabapps/create-webpack-config", - "version": "0.3.2", + "version": "0.3.3", "description": "A utility for creating webpack configs with common settings", "main": "src/index.js", "scripts": {