vue环境的一步安装+移动端开发字体自动处理px转rem

第一步 实测解决:系统上禁止运行脚本(目的是为了npm create可以直接创建好项目)
https://blog.csdn.net/l_x_cser/article/details/104956657

第二步 vue --version 检测脚手架的版本 如果低于3.0
npm uninstall vue-cli -g 如是有的话,就用命令卸载
npm -g install [email protected] 安装脚手架

第三步 vue create +项目名称

在这里插入图片描述

移动端字体解决
第一步 npm i postcss-pxtorem -D
第二步 npm i amfe-flexible -S
第三步 新建 postcss.config.js文件(将下面内容复制到文件里头)
module.exports = {
plugins: {
‘autoprefixer’: {},
‘postcss-pxtorem’: {
rootValue: 37.5,
propList: [’*’]
}
}
}
第四步 入口文件main.js导入 amfe-flexible
import ‘amfe-flexible’

猜你喜欢

转载自blog.csdn.net/renxiaoxing55/article/details/108865607
今日推荐