summaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
authormokha <mokha@cisco.com>2018-09-28 17:00:03 -0600
committermokha <mokha@cisco.com>2018-09-28 17:00:03 -0600
commitd0e5f3d19e83dc762381752fa917881afc97ab87 (patch)
tree12508a1bf38cc4bfae7c69a9066579ab86313ce2 /webpack.config.js
parent0b7a5eba05406a538d11d85388e155fcee838e70 (diff)
split vendor assets into separate files.
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/webpack.config.js b/webpack.config.js
index 3bc6d19..f6b1a93 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -32,6 +32,19 @@ const productionConfig = merge([
name: "[name].[ext]",
},
}),
+ {
+ optimization: {
+ splitChunks: {
+ cacheGroups: {
+ commons: {
+ test: /[\\/]node_modules[\\/]/,
+ name: "vendor",
+ chunks: "initial",
+ }
+ }
+ }
+ }
+ },
]);
const developmentConfig = merge([
parts.devServer({