react + ant-mobile + lib-flexible adaptation project to build a mobile terminal design dimensions (750)

   Use lib-flexible to react in the installation

npm install lib-flexible --save

  Because the plug-in using rem adaptation, so the installation of two plug-ins

npm install postcss-px2rem --save
npm install postcss-px2rem-exclude --save

  Then the introduction of plug-in configuration file in webpack.config.js

const px2rem = require('postcss-px2rem-exclude');
  After the injection, there is provided ant-mobile does not convert the style, design size 750px
px2rem({remUnit:75,exclude: /node_modules/i}),

  

It should be exposed react profile, if you do not know how to see the configuration file, I can see another blog

  https://www.cnblogs.com/muzimumu/p/11934672.html

Guess you like

Origin www.cnblogs.com/muzimumu/p/11955828.html