Skip to content

The v5 plugin API was not updated to support cssnano v4 #69

Closed
@jzempel

Description

@jzempel

v5.0.0 was a breaking change in that it was updated to depend on cssnano v4.0.2. However, this plugin was not updated to receive options per the PostCSS 6.x breaking change described by cssnano.

Please see https://cssnano.co/guides/presets/ for updated API details.

For example, attempt the following:

new OptimizeCSSAssetsPlugin({
  cssProcessorOptions: { /* update API to receive a cssPluginOptions? */
    preset: [
      'default',
      {
        cssDeclarationSorter: false,
        normalizeWhitespace: false
      }
    ]
  }
});

Result: declarations will still be sorted and whitespace will be compressed by cssnano 4.

Reference:

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