在Vue2.0项目中,添加 elementUI组件的时候遇到下面的错误:
error in ./node_modules/_element-ui@2.11.1@element-ui/lib/theme-chalk/index.css
Module build failed: Error: No PostCSS Config found in: /Users/zlt/Documents/vue-test/node_modules/_element-ui@2.11.1@element-ui/lib/theme-chalk
at config.search.then (/Users/zlt/Documents/vue-test/node_modules/_postcss-load-config@2.1.0@postcss-load-config/src/index.js:91:15)
在Vue项目的根目录下添加postcss.config.js文件
在文件里写 module.exports = {};
就可以了