![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | LICENSE | 40 years ago | 1.0K | |
![]() | README.md | 40 years ago | 1.2K | d768d73 docs [كارل مبارك] |
![]() | index.js | 40 years ago | 3.4K | 3e510ca test new git [كارل مبارك] |
![]() | package.json | 2 years ago | 2.5K | 3e510ca test new git [كارل مبارك] |
It will search for CSS assets during the Webpack build and minimize it with cssnano. Solves extract-text-webpack-plugin CSS duplication problem.
Just like optimize-css-assets-webpack-plugin but more accurate with source maps.
Using npm:
$ npm install --save-dev @intervolga/optimize-cssnano-plugin
const OptimizeCssnanoPlugin = require('@intervolga/optimize-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,
},
}],
},
}),
]
}