webpack引入css报错问题

webpack 根据官网安装报错

ERROR in ./src/style.css 1:0
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

 把 import './style.css';改成下面这个就发现打包成功了。
 
import 'style-loader!css-loader!./style.css';

  

 

 

posted @ 2020-10-20 18:49  Lolita_web  阅读(1023)  评论(0编辑  收藏  举报