Improve size of vendors files
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Peter Stuifzand 2020-11-02 23:03:45 +01:00
parent 0012bb2acc
commit 36d42b14d4
2 changed files with 10 additions and 5 deletions

View File

@ -51,7 +51,7 @@
"test": "node_modules/.bin/mocha -r esm", "test": "node_modules/.bin/mocha -r esm",
"watch": "webpack --watch --hide-modules", "watch": "webpack --watch --hide-modules",
"start": "webpack-dev-server --open --hot", "start": "webpack-dev-server --open --hot",
"build": "webpack --progress --hide-modules", "build": "webpack --progress --hide-modules --mode=production",
"docker": "webpack --color=false --hide-modules" "docker": "webpack --color=false --hide-modules --mode=production"
} }
} }

View File

@ -33,8 +33,7 @@ module.exports = {
plugins: [ plugins: [
new CleanWebpackPlugin(), new CleanWebpackPlugin(),
new MiniCssExtractPlugin({ new MiniCssExtractPlugin({
filename: '[name].css', filename: '[name].css'
chunkFilename: "[id].css"
}), }),
], ],
@ -50,7 +49,13 @@ module.exports = {
test: /[\\/]node_modules[\\/]/, test: /[\\/]node_modules[\\/]/,
name: 'vendors', name: 'vendors',
chunks: 'all' chunks: 'all'
} },
styles: {
name: 'styles',
test: /\.css$/,
chunks: 'all',
enforce: true,
},
} }
} }
} }