ERROR in ./src/imgs/left.png
Module parse failed: C:\Users\Administrator\Desktop\test\src\imgs\left.png Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./~/css-loader!./src/css/banner.css 6:570-597
@ ./src/css/banner.css
@ ./src/js/index.js
ERROR in ./src/imgs/right.png
Module parse failed: C:\Users\Administrator\Desktop\test\src\imgs\right.png Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./~/css-loader!./src/css/banner.css 6:737-765
@ ./src/css/banner.css
@ ./src/js/index.js
我的webpack.config.js配置如下
var webpack=require('webpack');
module.exports={
entry:'./src/js/index.js',
output:{
path:__dirname+'/bundle',
filename:'[name].js'
},
module: {
rules: [
{
test: /.css$/,
use: ['style-loader','css-loader']
},
{
test:'/.(png|jpg|gif)$/',
use: [
{
loader: 'url-loader',
options: {
name: 'assets/[name]-[hash:5].[ext]',
limit: 4000
}
},
'image-webpack-loader'
]
}
]
}
}
请问大神为什么会报那样的错误 求指教