- 安装插件(autoprefixer 依赖于postcss 所以也要安装)
npm install postcss autoprefixer --save
- 配置 postcss.config.js
module.exports = {
'plugins': {
'autoprefixer': {}
}
}
- 运行项目如果出现一下问题
执行npm install autoprefixer@8.0.0 -D 降低版本
- 最后随便写一句css运行项目查看
出现这种说明说明成功!