When using @alias imports, CRA v3.0.1 will fail in TypeScript production builds in CI
Craco is awesome to support @alias paths. But with CRA v3.0.1 an annoying warning is generated when running a production build that will cause CI to throw an error when using TypeScript.
aliased imports are not supported
This is because of line 132 in: react-scripts/scripts/utils/verifyTypeScriptSetup.js
paths: { value: undefined, reason: 'aliased imports are not supported' },
Resolving this seems out of the scope of Craco as it happens before the webpack build.
Leaving a solution here in case somebody needs it.
Install patch-package and comment out the line!
Hope this helps.
This will not be necessary when eventually CRA supports @aliases as they say that they intend to.
@euanmillar Do you have a source for the CRA team stating they intend to support @Aliases?