Skip to content

Commit c10740d

Browse files
committed
microoptimization for re-build speed
1 parent 4e42acb commit c10740d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/more/webpack.config.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ module.exports = {
123123

124124
output: {
125125
path: isProd ? buildDir : undefined,
126+
// small performance boost in development
127+
pathinfo: isProd,
126128
filename: isProd ? '[name].[contenthash:6].js' : '[name].js',
127129
publicPath: '',
128130
chunkFilename: isProd
@@ -141,7 +143,12 @@ module.exports = {
141143
namedModules: true,
142144
noEmitOnErrors: true,
143145
runtimeChunk: true,
144-
splitChunks: {
146+
// faster dev build
147+
removeEmptyChunks: isProd,
148+
// faster dev build
149+
removeAvailableModules: isProd,
150+
// faster dev build if no splitChunks
151+
splitChunks: isProd && {
145152
chunks: 'all',
146153
name: false,
147154
},

0 commit comments

Comments
 (0)