diff options
Diffstat (limited to 'vnext/server/webpack.config.js')
-rw-r--r-- | vnext/server/webpack.config.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/vnext/server/webpack.config.js b/vnext/server/webpack.config.js index 61f00d4d..77a86abd 100644 --- a/vnext/server/webpack.config.js +++ b/vnext/server/webpack.config.js @@ -1,11 +1,11 @@ /* eslint-disable @typescript-eslint/no-var-requires */ -const ESLintPlugin = require('eslint-webpack-plugin'); -const TerserPlugin = require('terser-webpack-plugin'); +const ESLintPlugin = require('eslint-webpack-plugin') +const TerserPlugin = require('terser-webpack-plugin') module.exports = () => { - const node_env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development'; - const dev = node_env !== 'production'; + const node_env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development' + const dev = node_env !== 'production' const config = { mode: node_env, devtool: dev ? 'cheap-module-source-map' : false, @@ -37,7 +37,7 @@ module.exports = () => { symlinks: false, extensions: ['.js'] } - }; + } if (dev) { config.plugins.push( new ESLintPlugin({ @@ -46,7 +46,7 @@ module.exports = () => { failOnWarning: false, failOnError: true, fix: false - })); + })) config.devServer = { hot: true, historyApiFallback: true, @@ -55,7 +55,7 @@ module.exports = () => { runtimeErrors: true } } - }; + } } config.optimization = { minimize: !dev, @@ -67,6 +67,6 @@ module.exports = () => { terserOptions: {}, }), ] - }; - return config; -}; + } + return config +} |