element-ui引入index.css报错(No PostCSS Config found in:)

报错内容:No PostCSS Config found in: C:\Users\Desktop\Taboo\Taboo-portal\node_modules\element-ui\lib\theme-chalk
at config.load.then (C:\Users\Desktop\Taboo\Taboo-portal\node_modules\postcss-load-config\src\index.js:55:15)
at
解决方法:在项目根目录新建postcss.config.js文件,并对postcss进行配置:
前提是: install 了 postcss-loader

module.exports = { 
    plugins: { 
      'autoprefixer': {browsers: 'last 5 version'} 
    } 
  }

猜你喜欢

转载自blog.csdn.net/jokren/article/details/86065217