From 36d42b14d4a1eaf3adeca4f3d70319348ead482a Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Mon, 2 Nov 2020 23:03:45 +0100 Subject: [PATCH] Improve size of vendors files --- editor/package.json | 4 ++-- editor/webpack.config.js | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/editor/package.json b/editor/package.json index 3d91770..10c977e 100644 --- a/editor/package.json +++ b/editor/package.json @@ -51,7 +51,7 @@ "test": "node_modules/.bin/mocha -r esm", "watch": "webpack --watch --hide-modules", "start": "webpack-dev-server --open --hot", - "build": "webpack --progress --hide-modules", - "docker": "webpack --color=false --hide-modules" + "build": "webpack --progress --hide-modules --mode=production", + "docker": "webpack --color=false --hide-modules --mode=production" } } diff --git a/editor/webpack.config.js b/editor/webpack.config.js index 9410d59..dc691e8 100644 --- a/editor/webpack.config.js +++ b/editor/webpack.config.js @@ -33,8 +33,7 @@ module.exports = { plugins: [ new CleanWebpackPlugin(), new MiniCssExtractPlugin({ - filename: '[name].css', - chunkFilename: "[id].css" + filename: '[name].css' }), ], @@ -50,7 +49,13 @@ module.exports = { test: /[\\/]node_modules[\\/]/, name: 'vendors', chunks: 'all' - } + }, + styles: { + name: 'styles', + test: /\.css$/, + chunks: 'all', + enforce: true, + }, } } }