feat: webpack build improvement 2x and unused scripts files are removed and refactored

This commit is contained in:
Nishchit Dhanani
2023-08-03 15:13:18 +05:30
parent 59689cd3df
commit 90ada8660e
8 changed files with 29 additions and 108 deletions

View File

@@ -6,6 +6,7 @@ const TerserPlugin = require('terser-webpack-plugin');
const base = require('./webpack.common');
// const withReport = process.env.npm_config_withReport;
const nodeEnv = process.env.NODE_ENV;
module.exports = merge(base, {
mode: 'development',
@@ -15,7 +16,7 @@ module.exports = merge(base, {
globalObject: 'this',
filename: '[name].dev.js',
chunkFilename: '[name].dev.js',
path: `${__dirname}/build/${env}`,
path: `${__dirname}/build/${nodeEnv}`,
publicPath: '',
},
optimization: {