Skip to content

Commit 121eedb

Browse files
author
FlorentinTh
committed
build(webpack): update production build wepback file to remove warnings and fix vendor generation
1 parent 5e9c01d commit 121eedb

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

webpack.prod.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,8 @@ const prod = {
143143
cacheGroups: {
144144
defaultVendors: {
145145
test: /[\\/]node_modules[\\/]/,
146-
name(module) {
147-
const packageName = module.context.match(
148-
/[\\/]node_modules[\\/](.*?)([\\/]|$)/
149-
)[1];
150-
return 'npm.' + packageName.replace('@', '');
151-
}
146+
name: 'vendors',
147+
chunks: 'all'
152148
}
153149
}
154150
}
@@ -173,7 +169,8 @@ const prod = {
173169
colors: true,
174170
entrypoints: false,
175171
errorDetails: false,
176-
modules: false
172+
modules: false,
173+
warnings: false
177174
}
178175
};
179176

0 commit comments

Comments
 (0)