oklas/react-app-alias

Invalid ForkTsCheckerWebpackPlugin configuration object

hirikarate opened this issue · 2 comments

I'm using

  • "react-scripts": "5.0.0"
  • "react-app-rewire-alias": "1.1.5",
  • "react-app-rewired": "2.1.8"

and encountering this error:

Invalid configuration object. ForkTsCheckerWebpackPlugin has been initialized using a configuration object that does not match the API schema.
 - configuration has an unknown property 'compilerOptions'. These properties are valid:
   object { async?, typescript?, eslint?, formatter?, issue?, logger? }

I believe the problem is at aliasDangerous.js#L98 where the invalid property compilerOptions is added.

const options = {...opts, compilerOptions}

I tried modifying the source code locally and this version works:

const options = {
   ...opts,
   typescript: {
      ...opts.typescript,
      configOverwrite: compilerOptions,
   }
}

If you think this fix is reasonable, please apply it.

oklas commented

This is released 1.1.6, you can check

oklas commented

Previous implementation has been added for compatibility.