Question:
Tell me how to add autoprefixer to vue-cli (webpack-simple)?
Answer:
Opening the documentation
https://github.com/vuejs/vue-loader/blob/master/docs/en/options.md#postcss
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'] })]