美文网首页
vue引入element-ui的css后报错

vue引入element-ui的css后报错

作者: shaguamayi | 来源:发表于2019-02-19 15:32 被阅读0次

ERROR Failed to compile with 1 errors 15:24:02
error in ./node_modules/_element-ui@2.5.4@element-ui/lib/theme-chalk/index.css

Module build failed: Error: No PostCSS Config found in: D:\文件\vue-slot-demo-master\vue-slot-demo-master\node_modules_element-ui@2.5.4@element-ui\lib\theme-chalk
at config.load.then (D:\文件\vue-slot-demo-master\vue-slot-demo-master\node_modules_postcss-load-config@2.0.0@postcss-load-config\src\index.js:55:15)
表示某个css不能被引入,因为webpack升级了,没有找到postcss的配置
在根目录下建立postcss.config.js文件,加上以下内容
module.exports = {
plugins: {
'autoprefixer': { browsers: 'last 5 version' }
}
}

相关文章

网友评论

      本文标题:vue引入element-ui的css后报错

      本文链接:https://www.haomeiwen.com/subject/clhfyqtx.html