javascript – how to add autoprefixer?


Tell me how to add autoprefixer to vue-cli (webpack-simple)?


Opening the documentation

And we see

  loader: 'vue-loader',
  options: {
    // note: do not nest the `postcss` option under `loaders`
    postcss: [require('postcss-cssnext')()],
    loaders: {
      // ...

We repeat the example from the documentation and install npm i postcss-cssnext -D

We launch and see that everything works, prefixes up to -ms .

How to add the necessary ones, for example like this.

postcss: [require('postcss-cssnext')({ browsers: ['last 1 versions'] })]
Scroll to Top