3
Webpack: Starting ...
ui/node_modules/schema-utils/dist/validate.js:104
    throw new _ValidationError.default(errors, schema, configuration);
    ^

ValidationError: Invalid options object. Watch Ignore Plugin has been initialized using an options object that does not match the API schema. {
  schema: {
    title: 'WatchIgnorePluginOptions',
    type: 'object',
    additionalProperties: false,
    properties: {
      paths: {
        description: 'A list of RegExps or absolute paths to directories or files that should be ignored.',
        type: 'array',
        items: {
          description: 'RegExp or absolute path to directories or files that should be ignored.',
          anyOf: [ [Object], [Object] ]
        },
        minItems: 1
      }
    },
    required: [ 'paths' ]
  },
  headerName: 'Watch Ignore Plugin',
  baseDataPath: 'options',
  postFormatter: null
}

次の構成でスローされます。

new webpack.WatchIgnorePlugin([ 'src/test' ])

webpackのバージョンは「^5.0.0-rc.6」です。コンストラクタによると

constructor(paths: Array<string | RegExp>)

[ 'src/test' ]大丈夫なはずです。私はどこで間違いをしましたか?

4

1 に答える 1