aboutsummaryrefslogtreecommitdiff
path: root/vnext/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/webpack.config.js')
-rw-r--r--vnext/webpack.config.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/vnext/webpack.config.js b/vnext/webpack.config.js
index 65f2aad6..241cc431 100644
--- a/vnext/webpack.config.js
+++ b/vnext/webpack.config.js
@@ -1,13 +1,13 @@
/* eslint-disable @typescript-eslint/no-var-requires */
-const ESLintPlugin = require('eslint-webpack-plugin');
-const HtmlWebpackPlugin = require('html-webpack-plugin');
-const MiniCssExtractPlugin = require('mini-css-extract-plugin');
-const TerserPlugin = require('terser-webpack-plugin');
+const ESLintPlugin = require('eslint-webpack-plugin')
+const HtmlWebpackPlugin = require('html-webpack-plugin')
+const MiniCssExtractPlugin = require('mini-css-extract-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 ? 'source-map' : false,
@@ -75,7 +75,7 @@ module.exports = () => {
symlinks: false,
extensions: ['.js']
}
- };
+ }
if (dev) {
config.plugins.push(
new ESLintPlugin({
@@ -84,14 +84,14 @@ module.exports = () => {
failOnWarning: false,
failOnError: true,
fix: false
- }));
+ }))
config.devServer = {
hot: true,
historyApiFallback: true,
client: {
overlay: true
}
- };
+ }
}
config.optimization = {
minimize: !dev,
@@ -103,6 +103,6 @@ module.exports = () => {
terserOptions: {},
}),
]
- };
- return config;
-};
+ }
+ return config
+}