问题描述:在使用Angular 7时,发现CSS Grid与Autoprefixer不兼容。
解决方法:
确认是否安装了Autoprefixer插件,可以通过在项目根目录下的package.json文件中查看是否有autoprefixer的依赖项。
如果没有安装Autoprefixer插件,可以通过以下命令安装:
npm install autoprefixer --save-dev
npm install postcss --save-dev
module.exports = {
plugins: [
require('autoprefixer')
]
}
"options": {
"postcss": {
"config": "./postcss.config.js"
}
}
这样就可以解决Angular 7中CSS Grid与Autoprefixer不兼容的问题了。