mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
FIX: webpack CSS minifiction
This commit is contained in:
parent
f713b7e9cd
commit
b2de1a54a0
@ -102,6 +102,7 @@
|
||||
"uglify-js": "git://github.com/mishoo/UglifyJS2.git#harmony-v2.8.22",
|
||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||
"url-loader": "^0.6.2",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.3",
|
||||
"webpack": "^4.39.1",
|
||||
"webpack-cli": "^3.3.6",
|
||||
"webpack-dev-server": "^3.8.0",
|
||||
|
@ -15,6 +15,7 @@ const autoprefixer = require('autoprefixer');
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
|
||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
||||
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||
|
||||
let plugins = [
|
||||
new webpack.DefinePlugin({
|
||||
@ -52,6 +53,18 @@ let plugins = [
|
||||
windows: true
|
||||
}
|
||||
}),
|
||||
new OptimizeCssAssetsPlugin({
|
||||
//assetNameRegExp: /\.optimize\.css$/g,
|
||||
cssProcessor: require('cssnano'),
|
||||
cssProcessorPluginOptions: {
|
||||
preset: ['default', {
|
||||
discardComments: {
|
||||
removeAll: true
|
||||
}
|
||||
}],
|
||||
},
|
||||
canPrint: true
|
||||
}),
|
||||
];
|
||||
|
||||
// add themes favicons
|
||||
|
Loading…
Reference in New Issue
Block a user