第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

關(guān)于image-webpack-loader的問題,看來源碼也沒找出來問題,最后還是用的img-loader

ERROR in ./src/assets/1.jpg

Module build failed: TypeError: Cannot read property 'bypassOnDebug' of null

? ? at Object.module.exports (F:\webpack\webpack-demo1\node_modules\image-webpack-loader\index.js:30:26)

正在回答

5 回答

The?LoaderOptionsPlugin?is to make the transition from webpack 1 easier. In webpack 2 you should define the options directly on the loader.

Your rule would look like this (using the webpack 2 rule from the README with your options):

{
? ?test: /\.(gif|png|jpe?g|svg)$/i,
? ?use: [
? ? ? ?'file-loader',
? ? ? ?{
? ? ? ? ? ?loader: 'image-webpack-loader',
? ? ? ? ? ?options: {
? ? ? ? ? ? ? ?mozjpeg: {
? ? ? ? ? ? ? ? ? ?quality: 65,
? ? ? ? ? ? ? ?},
? ? ? ? ? ? ? ?pngquant: {
? ? ? ? ? ? ? ? ? ?quality: '65-90',
? ? ? ? ? ? ? ? ? ?speed: 4,
? ? ? ? ? ? ? ?},
? ? ? ? ? ? ? ?svgo: {
? ? ? ? ? ? ? ? ? ?plugins: [
? ? ? ? ? ? ? ? ? ? ? ?{
? ? ? ? ? ? ? ? ? ? ? ? ? ?removeViewBox: false,
? ? ? ? ? ? ? ? ? ? ? ?},
? ? ? ? ? ? ? ? ? ? ? ?{
? ? ? ? ? ? ? ? ? ? ? ? ? ?removeEmptyAttrs: false,
? ? ? ? ? ? ? ? ? ? ? ?},
? ? ? ? ? ? ? ? ? ?],
? ? ? ? ? ? ? ?}
? ? ? ? ? ?}
? ? ? ?}
? ?]}

0 回復(fù) 有任何疑惑可以回復(fù)我~

一運(yùn)行也是爆這個錯

http://img1.sycdn.imooc.com//58ff1ea5000147c406400131.jpg

如果寫成這樣image-webpack-loader?bypassOnDebug,他直接notfounderror了
http://img1.sycdn.imooc.com//58ff1e490001e91706390238.jpg

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

qq__6268

這個問題我也遇到了,怎么解決
2017-08-09 回復(fù) 有任何疑惑可以回復(fù)我~

'image-webpack-loader?bypassOnDebug' 建議看一下npm上的描述。https://www.npmjs.com/package/image-webpack-loader

1 回復(fù) 有任何疑惑可以回復(fù)我~

同問這個問題,嘗試過使用img-loader可以正常編譯,是可以壓縮圖片的

0 回復(fù) 有任何疑惑可以回復(fù)我~

同問這個問題,嘗試過使用img-loader可以正常編譯,但是沒有壓縮圖片。

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消
webpack深入與實(shí)戰(zhàn)
  • 參與學(xué)習(xí)       86558    人
  • 解答問題       750    個

webpack實(shí)戰(zhàn)教程,用真實(shí)項(xiàng)目帶你探索 webpack 強(qiáng)大的功能

進(jìn)入課程

關(guān)于image-webpack-loader的問題,看來源碼也沒找出來問題,最后還是用的img-loader

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號