From ec71febf55f07c9081a87b78d4f2564f1b2eef5a Mon Sep 17 00:00:00 2001 From: John Godley Date: Wed, 30 Jun 2021 12:57:32 +0100 Subject: [PATCH] Force ES6 for browser build This prevents a `module is not defined` error --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e498be2f6..df729752f 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "start": "BUILD_ENV=es6 babel src --out-dir build-module --source-maps --ignore 'src/**/__tests__/*.js' --copy-files --no-copy-ignored --watch", "build:es6": "BUILD_ENV=es6 babel src --out-dir build-module --source-maps --ignore 'src/**/__tests__/*.js' --copy-files --no-copy-ignored", "build:cjs": "BUILD_ENV=cjs babel src --out-dir build --source-maps --ignore 'src/**/__tests__/*.js' --copy-files --no-copy-ignored", - "build:browser": "NODE_ENV=production webpack --mode production --progress --config ./webpack.config.browser.js", + "build:browser": "BUILD_ENV=es6 NODE_ENV=production webpack --mode production --progress --config ./webpack.config.browser.js", "build:types": "tsc --build", "build": "yarn build:es6 && yarn build:cjs && yarn build:browser && yarn build:types", "clean": "rm -rf build build-module build-browser build-types dist",