npm install px2rem-loader --dev
npm install amfe-flexible --save
vue.config.js
chainWebpack(config) {
config.module
.rule('scss')
.oneOf('vue')
.use('px2rem-loader')
.loader('px2rem-loader')
.before('sass-loader') // this makes it work.
.options({ remUnit: 75, remPrecision: 8 })
.end()
}
main.js
import 'amfe-flexible'