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",
"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"
}
}

View File

@ -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,
},
}
}
}