1. Development environment Vue
2. Computer system windows10 Professional Edition
3. In the process of development, we need to adapt. Let me share the methods below, hoping to be helpful to you.
4. Without much nonsense, operate directly:
//Install lib flexible
npm install lib-flexible --save-dev
5. Modify the Lib flexible configuration
//File on node_ modules>lib-flexible>flexible
5-1. In Mian Introducing lib flexible into TS
//Import lib flexible
import "lib-flexible";
6. Install postcss pxtorem (PX to REM)
npm install postcss-pxtorem -D
6-1. Create a new under the root directory postcssrc. JS (same level as package)
module.exports = {
"plugins": {
"autoprefixer": {},
'postcss-pxtorem': {
Rootvalue: 19.2, // 75 indicates 750 design draft, 37.5 indicates 375 design draft
propList: ['*']
}
}
}
6-2. You may encounter the following errors
6-3. Analyze the reason
//The maximum version is 6. The version of 8 cannot be found
6-4. The solution is as follows:
npm install [email protected] -D
7. The sharing of this issue ends here. I hope it will help you. Let’s work together to reach the peak.