Skip to content

cssnano options not correct pass to cssnano #71

@zcs19871221

Description

@zcs19871221

when set in webpack in optimization like this:

new OptimizeCSSAssetsPlugin({ cssProcessorOptions: { calc: false } }),
i found the option not pass,in the cssnano module quickstart.js file, it works this:
const cssnanoOpts = { preset: [ 'default', { calc: false, } ] }; cssnano.process(css, postcssOpts, cssnanoOpts).then(result => { console.log(result.css); });
but in this plugin, use this: return this.options.cssProcessor.process(css.source, processOptions) maybe it is a version problem, but after i change source code it do well.

my cssnano version is 4.0.2, optimize-css-assets-webpack-plugin version is 5.0.0. hope to solve it . thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions