You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2021/11/22 19:41:03 UTC

[superset] 05/12: fix: Use production build config for cypress tests (#16978)

This is an automated email from the ASF dual-hosted git repository.

elizabeth pushed a commit to branch 1.4
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 5f34ae2cf30191ca0e8ac0c0493a86c20b28c781
Author: Erik Ritter <er...@airbnb.com>
AuthorDate: Tue Oct 5 11:13:33 2021 -0700

    fix: Use production build config for cypress tests (#16978)
    
    * fix: Use production build config for cypress tests
    
    * set usedExports to global
    
    (cherry picked from commit 2757b93feacfc3fca31a21a10ee153c30dfb4929)
---
 superset-frontend/package.json      | 2 +-
 superset-frontend/webpack.config.js | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index 1443695..115f70b 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -16,7 +16,7 @@
     "dev-server": "cross-env NODE_ENV=development BABEL_ENV=development node --max_old_space_size=4096 ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --mode=development",
     "prod": "npm run build",
     "build-dev": "cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=development webpack --mode=development --color",
-    "build-instrumented": "cross-env NODE_ENV=development BABEL_ENV=instrumented webpack --mode=development --color",
+    "build-instrumented": "cross-env NODE_ENV=production BABEL_ENV=instrumented webpack --mode=production --color",
     "build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=production BABEL_ENV=\"${BABEL_ENV:=production}\" webpack --mode=production --color",
     "lint": "eslint --ignore-path=.eslintignore --ext .js,.jsx,.ts,.tsx . && npm run type",
     "prettier-check": "prettier --check 'src/**/*.{css,less,sass,scss}'",
diff --git a/superset-frontend/webpack.config.js b/superset-frontend/webpack.config.js
index 2a5f89e..39cdbf0 100644
--- a/superset-frontend/webpack.config.js
+++ b/superset-frontend/webpack.config.js
@@ -273,6 +273,7 @@ const config = {
         },
       },
     },
+    usedExports: 'global',
     minimizer: [new CssMinimizerPlugin()],
   },
   resolve: {