猿问

webpack引入css报错

    module: {

            loaders: [

                {test: /\.css$/, loader: 'style!css'}

            ]

   }

   上面是配置

   

   require('./index.css');

   这里是引入css文件

ERROR in ./entry.js
Module not found: Error: Can't resolve 'style' in '/Users/zwf/MyBlog'
BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.
You need to specify 'style-loader' instead of 'style'.
@ ./entry.js 3:0-22
这里是报错

求助


莫回无
浏览 900回答 1
1回答

千万里不及你

style改成style-loader
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答