配置url-loader出现Error: options/query provided without loader (use loader + options)错误。
1.报错提示
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/203351e2e49234a03248d14c909eea00.png)
2.报错之前配置
{
test: /\.(png|jpg|gif)$/,
use: 'url-loader',
options: {
limit: 10240,
esModule: false,
name: '[hash:8].[ext]',
},
exclude: /node_modules/
}
3.修改
{
test: /\.(png|jpg|gif)$/,
use: 'url-loader',
}