optimizer-cssnano-plugin
v1.0.0
Published
WebPack 2+ plugin for CSS minification after ExtractTextPluging
Downloads
2
Readme
optimizer-cssnano-plugin
修改自optimize-cssnano-plugin 只修改了test匹配规则部分,支持
?
拼接过的文件名
Installation:
Using npm:
npm install --save-dev @optimizer-cssnano-plugin
Configuration:
const OptimizeCssnanoPlugin = require('optimizer-cssnano-plugin');
module.exports = {
module: {
loaders: [
{
test: /\.css$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader")
}
]
},
plugins: [
new ExtractTextPlugin("styles.css"),
new OptimizeCssnanoPlugin({
sourceMap: nextSourceMap,
cssnanoOptions: {
preset: ['default', {
discardComments: {
removeAll: true,
},
}],
},
}),
]
}