1、在package.json文件中
"devDependencies": {
“autoprefixer”: “^9.7.6”,
“css-loader”: “^3.5.2”,
“file-loader”: “^6.0.0”,
“node-sass”: “^4.13.1”,
“postcss-loader”: “^3.0.0”,
“sass-loader”: “^8.0.2”,
“style-loader”: “^1.1.3”,
“url-loader”: “^4.1.0”,
“webpack”: “^4.42.1”,
“webpack-cli”: “^3.3.11”
}
2、在webpack.congfig.js文件中
{
test: /.(css|scss)$/,
use: [
“style-loader”,
“css-loader”,
“sass-loader”,
‘postcss-loader’
]
}
3、在postcss.config.js
module.exports = {
plugins: [require(“autoprefixer”)],
};
这样没有效果,老师,这个是什么原因啊