image-webpack-loader 在webpack2中使用出错
image-webpack-loader 在webpack2中使用出错
image-webpack-loader 在webpack2中使用出错
2017-02-24
我是这样配置的
{
test: /\.(png|jpg|gif|svg)$/i,
use: ['url-loader?limit=1000&name=images/[name]-[hash:5].[ext]','image-webpack-loader']
}
报错是这样:
ERROR in ./images/ico_arrowB.png
Module build failed: TypeError: Cannot read property 'bypassOnDebug' of null
at Object.module.exports (C:\Users\Administrator\Desktop\cal\node_modules\image-webpack-loader\index.js:30:26)
@ ./~/css-loader!./~/autoprefixer-loader!./css/common.css 6:3955-3990
@ ./css/common.css
@ ./script/jquery-1.11.3.mini.js
@ multi ./script/user_calendar.js ./script/common.js ./laydate/laydate.js ./script/sweetalert.min.js ./script/jquery.se
archableSelect.js ./script/jquery-1.11.3.mini.js
为何 会出现警告呢。。。。webpack2 按照 image-webpack-loader 的写的 那个大神帮忙看看
WARNING in ./src/images/chosen.png
(Emitted value instead of an instance of Error) DEPRECATED. Configure gifsicle's interlaced option in its own options. (gifsicle.interlaced)
@ ./~/.0.28.0@css-loader!./~/._postcss-loader@1.3.3@postcss-loader?{}!./~/._less-loader@4.0.3@less-loader/dist!./src/components/layer/layer.less 6:192-226
@ ./src/components/layer/layer.less
@ ./src/components/layer/layer.js
@ ./src/app.js
WARNING in ./src/images/chosen.png
(Emitted value instead of an instance of Error) DEPRECATED. Configure optipng's optimizationLevel option in its own options. (optipng.optimizationLevel)
@ ./~/.0.28.0@css-loader!./~/._postcss-loader@1.3.3@postcss-loader?{}!./~/._less-loader@4.0.3@less-loader/dist!./src/components/layer/layer.less 6:192-226
@ ./src/components/layer/layer.less
@ ./src/components/layer/layer.js
@ ./src/app.js
举报