move devtool setting into main config object

上级 f2a0f9a8
......@@ -77,6 +77,8 @@ const config = {
globalObject: 'this', // allow HMR and web workers to play nice
},
devtool: IS_PRODUCTION ? 'source-map' : 'cheap-module-eval-source-map',
optimization: {
nodeEnv: false,
runtimeChunk: 'single',
......@@ -254,8 +256,6 @@ const config = {
};
if (IS_PRODUCTION) {
config.devtool = 'source-map';
// compression can require a lot of compute time and is disabled in CI
if (!NO_COMPRESSION) {
config.plugins.push(new CompressionPlugin());
......@@ -263,7 +263,6 @@ if (IS_PRODUCTION) {
}
if (IS_DEV_SERVER) {
config.devtool = 'cheap-module-eval-source-map';
config.devServer = {
host: DEV_SERVER_HOST,
port: DEV_SERVER_PORT,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册