Run webpack in production mode when building for releases. Fixes #2660

This commit is contained in:
Surinder Kumar 2017-09-13 09:47:01 +01:00 committed by Dave Page
parent 512afd6618
commit 120dbcc7d8
3 changed files with 7 additions and 6 deletions

View File

@ -28,6 +28,9 @@ install-node:
bundle:
cd web && yarn run bundle
bundle-dev:
cd web && yarn run bundle:dev
linter:
cd web && yarn run linter

View File

@ -85,14 +85,11 @@
},
"scripts": {
"linter": "yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js",
"webpacker": "yarn run webpack -- --config webpack.config.js",
"webpacker": "yarn run webpack -- --config webpack.config.js --progress",
"webpacker:watch": "yarn run webpack -- --config webpack.config.js --progress --watch",
"webpacker:dev": "yarn run webpack -- --config webpack.config.js",
"webpacker:prod": "yarn run linter && yarn run webpack -- --config webpack.config.js",
"bundle": "yarn run linter && yarn run webpacker",
"bundle:watch": "yarn run linter && yarn run webpacker:watch",
"bundle:dev": "yarn run linter && yarn run webpacker:dev",
"bundle:prod": "cross-env NODE_ENV=production yarn run webpacker:prod",
"bundle:dev": "yarn run linter && yarn run webpacker",
"bundle": "cross-env NODE_ENV=production yarn run bundle:dev",
"test:karma-once": "yarn run linter && yarn run karma start -- --single-run",
"test:karma": "yarn run linter && yarn run karma start",
"test:feature": "yarn run bundle && python regression/runtests.py --pkg feature_tests",

View File

@ -319,6 +319,7 @@ module.exports = {
optimizeAssetsPlugin,
definePlugin,
hardSourceWebpackPlugin,
sourceMapDevToolPlugin,
]: [
extractSass,
extractStyle,