為什么加了exclude之后就報(bào)了很多錯(cuò)誤呢?
為什么加了exclude之后就報(bào)了很多錯(cuò)誤呢? 這樣寫(xiě): exclude:__dirname+'/node_modules/', 這樣寫(xiě): ?exclude:'./node_modules/', 這樣寫(xiě): ?exclude:__dirname+/node_modules/, 這樣寫(xiě): ?exclude:/node_modules/, 都不行 錯(cuò)誤如下:
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? }]
2021-12-05
把exclude配置再option目錄下面,可不配置絕對(duì)路徑
2017-09-17
使用絕對(duì)路徑
2017-09-11
exclude: __dirname +'./node_modules/'
2017-07-14
錯(cuò)哪里了
2017-07-03
好吧,知道錯(cuò)哪里了