Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 6200dc5

Browse files
author
george
committed
moves optimizeCSSAssetsPlugin to plugins so it actually does stuff
1 parent 10910c0 commit 6200dc5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

config/webpack.prod.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module.exports = merge(common(true), {
1717
parallel: true,
1818
sourceMap: false,
1919
}),
20-
new OptimizeCSSAssetsPlugin(),
2120
],
2221
runtimeChunk: {
2322
name: "manifest",
@@ -34,6 +33,15 @@ module.exports = merge(common(true), {
3433
allowExternal: true,
3534
}),
3635

36+
// minify styles
37+
new OptimizeCSSAssetsPlugin({
38+
cssProcessorPluginOptions: {
39+
preset: ['default', {
40+
discardComments: { removeAll: true }
41+
}],
42+
},
43+
}),
44+
3745
// create gzip assets
3846
new CompressionPlugin({
3947
test: /\.(js|css)$/,

0 commit comments

Comments
 (0)