Closed BM-laoli closed 2 years ago
It's something that create-react-app's react-scripts package does - they explicitly delete anything that was in the paths variable when validating the tsconfig file: https://github.com/facebook/create-react-app/blob/main/packages/react-scripts/scripts/utils/verifyTypeScriptSetup.js#L159
There have been a few ways to work around it - one being to try making your tsconfig file extend from another file and set it in the other file, a second being to use something like patch-package
to patch the line in react-scripts so it doesn't delete the paths entry.
There's some discussion on this in an older issue: https://github.com/timarney/react-app-rewired/issues/375#issuecomment-474806096
Closing --- this given it's not a bug and no activity.
why is my tsconfig path cleared after startup, and how do I configure a path nickname?
Before:
tsconfig.js
config-overrides.js
after tsconfig