Vue.config.js配置报错怎么解决?
发布于 3 年前 作者 banyungong 1605 次浏览 来自 问答
粉丝福利 : 关注VUE中文社区公众号,回复视频领取粉丝福利

WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

  • configuration.module.rules[12].include should be one of these:
    RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? } | [RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? }]
    -> One or multiple rule conditions
    Details:
    • configuration.module.rules[12].include should be an instance of RegExp
    • configuration.module.rules[12].include should be a string.
    • configuration.module.rules[12].include should be an instance of function
    • configuration.module.rules[12].include[0] should be an instance of RegExp
    • configuration.module.rules[12].include[0]: The provided value “packages” is not an absolute path!
    • configuration.module.rules[12].include[0] should be an instance of function
    • configuration.module.rules[12].include[0] should be an array:
      [RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? }]
    • configuration.module.rules[12].include[0] should be an object.
    • configuration.module.rules[12].include should be an object.
    • configuration.module.rules[12].include[0] should be an instance of RegExp
    • configuration.module.rules[12].include[0]: The provided value “packages” is not an absolute path!
    • configuration.module.rules[12].include[0] should be an instance of function
    • configuration.module.rules[12].include[0] should be an array:
      [RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? }]
    • configuration.module.rules[12].include[0] should be an object.
回到顶部