• element-ui: 1.4.2
  • vue-cli: 2.8.2
1
2
3
4
5
6
7
8
9
10
11
12
// utils.j
exports.cssLoaders = function (options) {
...
return {
css: generateLoaders('postcss', {
plugins() {
return [require('postcss-px2rem')({ remUnit: 75 })]
}
}),
...
}
}
1
2
3
4
5
6
// vue-loader.conf.js
module.exports = {
...
postcss: [require('postcss-px2rem')({ remUnit: 75 })],
...
}