webpack-contrib / css-minimizer-webpack-plugin

cssnano plugin for Webpack
MIT License
314 stars 30 forks source link

style-loader Supported? #80

Open MitchTalmadge opened 3 years ago

MitchTalmadge commented 3 years ago

Documentation Is:

Please Explain in Detail...

I am unsure if this plugin supports style-loader. In my attempts to get it working, I have not seen any differences between using this plugin and not using it; however, I am unsure if this is my fault or because the plugin does not support it.

Your Proposal for Changes

Document whether this plugin works for style-loader or if it requires something like mini-css-extract-plugin.

alexander-akait commented 3 years ago

No, right now you need use cssnano as postcss plugin, but let's mark this as feature for better DX

tunnelpuzzle commented 1 year ago

@alexander-akait What would be the config to make cssnano and postcss-loader work with style-loader?

alexander-akait commented 1 year ago

@tunnelpuzzle Currently you can use cssnano as a plugin for postcss for style which use style-loader

tunnelpuzzle commented 1 year ago

@alexander-akait Is it possible to do that if you're also using css-loader? Not using css-loader that works but adding css-loader seems to make it not minify.

Edit: Setting sourceMap: false in css-loader seems to make it work.