vue-cli3.0中使用 postcss-pxtorem

vue.config.js


module.exports = {
    lintOnSave: true,
    css: {
        loaderOptions: {
            postcss: {
                plugins: [
                    require('postcss-pxtorem')({
                        rootValue : 1, // 换算的基数
                        selectorBlackList  : ['weui','mu'], // 忽略转换正则匹配项
                        propList   : ['*'],
                    }),
                ]
            }
        }
    },
}
posted @ 2019-09-10 11:44  wwj007  阅读(1033)  评论(0编辑  收藏  举报
……