亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

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

為什么加了exclude之后就報了很多錯誤呢?

為什么加了exclude之后就報了很多錯誤呢? 這樣寫: exclude:__dirname+'/node_modules/', 這樣寫: ?exclude:'./node_modules/', 這樣寫: ?exclude:__dirname+/node_modules/, 這樣寫: ?exclude:/node_modules/, 都不行 錯誤如下:

Invalid configuration object. Webpack has been initialised using a configur

?object that does not match the API schema.

?- configuration.module.rules[0].use should be one of these:

? ?non-empty string | function | object { loader?, options?, query? } | fun

?| [non-empty string | function | object { loader?, options?, query? }]

? ?Details:

? ? * configuration.module.rules[0].use should be a string.

? ? * configuration.module.rules[0].use should be an instance of function.

? ? * configuration.module.rules[0].use has an unknown property 'exclude'.

?properties are valid:

? ? ? object { loader?, options?, query? }

? ? * configuration.module.rules[0].use has an unknown property 'include'.

?properties are valid:

? ? ? object { loader?, options?, query? }

? ? * configuration.module.rules[0].use should be one of these:

? ? ? non-empty string | function | object { loader?, options?, query? }

? ? * configuration.module.rules[0].use should be an instance of function.

? ? * configuration.module.rules[0].use should be an array:

? ? ? [non-empty string | function | object { loader?, options?, query? }]


正在回答

5 回答

把exclude配置再option目錄下面,可不配置絕對路徑

0 回復 有任何疑惑可以回復我~

使用絕對路徑

0 回復 有任何疑惑可以回復我~

exclude: __dirname +'./node_modules/'

2 回復 有任何疑惑可以回復我~

錯哪里了

0 回復 有任何疑惑可以回復我~

好吧,知道錯哪里了

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

為什么加了exclude之后就報了很多錯誤呢?

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號