Skip to content

Disable remove properties default by autoprefixer? #369

@acrazing

Description

@acrazing

Because we always use autoprefixer to add prefixes for old browsers with custom browsers config, just like iOS >= 8 etc. But cssnano use default browsers config for autoprefixer to remove properties if we don't pass config to it. And then we need to write the config twice!

For example:

// webpack.config.js
var autoprefixerrc = {
  browsers: ['iOS >= 8']
}

module.exports = {
  module: {
    loaders: [
      {
        test: /\.css$/,
        loader: 'css-loader?' + JSON.stringify({autoprefixer: autoprefixer}) + '!postcss-loader'
      }
    ]
  },
  postcss: [
    autoprefixer(autoprefixerrc)
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions