diff --git a/package.json b/package.json index 986f47eae..2360308fd 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "scripts": { "compile:electron": "webpack --progress --config webpack.electron.config.js", "compile:web": "webpack --config webpack.web.config.js", - "compile": "yarn compile:electron && yarn compile:web", + "compile": "cross-env NODE_ENV=production yarn compile:electron && cross-env NODE_ENV=production yarn compile:web", "dev": "yarn dev:electron", "dev:electron": "cross-env NODE_ENV=development node ./src/platforms/electron/devServer.js", "dev:web": "webpack-dev-server --open --hot --progress --config webpack.web.config.js", diff --git a/webpack.base.config.js b/webpack.base.config.js index 25fc2ab0f..2a704b0d7 100644 --- a/webpack.base.config.js +++ b/webpack.base.config.js @@ -12,9 +12,9 @@ const UI_ROOT = path.resolve(__dirname, 'src/ui/'); const STATIC_ROOT = path.resolve(__dirname, 'static/'); const DIST_ROOT = path.resolve(__dirname, 'dist/'); -const baseConfig = { +let baseConfig = { mode: ifProduction('production', 'development'), - devtool: ifProduction('source-map', 'eval-source-map'), + devtool: ifProduction(false, 'eval-source-map'), node: { __dirname: false, },