webpack.config.js代码
test:/\.(png|jpg|gif|svn)$/i,
use:[
"url-loader?limit=1000&name=assrts/[name]-[hash:5].[ext]",
"image-webpack-loader",
//img-loader"
]
打包时报错,Error后面看不到,在cmd上看都是空的就一个点
ERROR in ./src/assets/assets.png
Module build failed: Error: ϵͳ�Ҳ���ָ����·����
at notFoundError (E:\yangweb\webpack\test3\node_modules\exec-buffer\node_mod
ules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (E:\yangweb\webpack\test3\node_modules\exec-buffer\node_modu
les\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (E:\yangweb\webpack\test3\node_modules\exec-buffer\n
ode_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
@ ./src/components/layer/layer.html 1:60-94
@ ./src/components/layer/layer.js
@ ./src/app.js
求大神帮忙
https://www.npmjs.com/package/image-webpack-loader
options: { bypassOnDebug: true, // webpack@1.x disable: true, // webpack@2.x and newer },
disable:true
我的jpg 文件 也是报错
用 cnpm 安装 image-webpack-loader 后可以。。
一样的问题,你解决了吗
imageWebpackLoader,为什么只识别png图片啊,一换成jpg就报错了
同样的问题 你解决了吗?
同样的问题 你解决了吗?
{
test:/\.(png|jpg|gif)$/i,
loaders:[
'url-loader?limit=100000&name=assets/[name]-[hash:5].[ext]',
'image-webpack-loader'
]
}
你们为什么都用use
老师的路径不是assets吗