This commit is contained in:
2020-09-27 10:37:36 +08:00
parent de899aebc8
commit c81668f397
6 changed files with 86 additions and 0 deletions

22
vue.config.js Normal file
View File

@@ -0,0 +1,22 @@
module.exports = {
css: {
loaderOptions: {
postcss: {
plugins: [
require('postcss-pxtorem')({ // 把px单位换算成rem单位
rootValue: 100, // 换算的基数(设计图750的根字体为32)
selectorBlackList: ['weui', 'mu'], // 忽略转换正则匹配项
propList: ['*']
})
]
}
}
},
configureWebpack: config => {
if (process.env.NODE_ENV === 'production') {
// 为生产环境修改配置...
} else {
// 为开发环境修改配置...
}
}
}