lahmatiy / postcss-csso

PostCSS plugin to minify CSS using CSSO
MIT License
119 stars 6 forks source link

Use with postcss.config.js? #22

Closed brycewray closed 3 years ago

brycewray commented 3 years ago

Is there any recommended procedure for using this in a postcss.config.js file, similar to how that’s done with other PostCSS minification plugins like postcss-clean or cssnano?

lahmatiy commented 3 years ago

There are no special recommendations, it works as any other plugin. You may setup postcss-csso in postcss.config.js like so:

module.exports = {
    plugins: [
        require('postcss-csso')({
            // options if any
        })
    ]
};

I've added this example in README. Thanks for the question!