我的是win10
系统
我用了npm install css-loader style-loader -g
我在index.js
上引入了css
require("style!css!./css/style.css");
但他就是找不到还报这种错
然后行进打包,这是我的根目录结构
那个
webpack
|___app
|___base.js
|___index.js
|___style.css
|___css
|___style.css
|___build
|___node_modules
|___index.html
|___package.json
|___webpack.confing.js
还有热加载也是第一次配置的时候是可以用的,但是删了项目得新配置就出问题了
输入了webpack-dev-server --hot --inline
端口号是没有冲突的能启动
但是就是报这个错
差点被你的代码给唬住,这俩loader你这么玩他们不好吧?
npm install css-loader style-loader -g
怎么着也应该安在项目内啊:
npm install css-loader style-loader --save-dev
至于webpack-dev-server
的问题,删了重装下吧
看看你的webpack.config.js,先定义好style- loader css-loader,不要在路径中那么做,