转载

http://blog.sina.com.cn/s/blog_1583435db0102ybkx.html

(1)安装lib-flexible

   npm install lib-flexible --save

(2) main.js中引入lib-flexible

    import 'lib-flexible'

(3) 安装postcss-px2rem-exclude

npm  install postcss-px2rem-exclude --save

(4) 在项目根目录中的package.json配置

   "postcss": {

    "plugins": {

      "autoprefixer": {},

      "postcss-px2rem-exclude":{

          "remUnit": 75,

          "exclude":"/node_modules|floder_name/i"

      }

    }

  },

(5)完成。重启项目。

 

posted on 2021-01-23 15:57  跛豪丶  阅读(376)  评论(0编辑  收藏  举报