I am trying to setup Path alias in my project by adding these values to tsconfig.json:
"compilerOptions": {
"baseUrl": "src",
"paths": {
"@store/*": ["store/*"]
},
And if I create an import, neither IntelliJ or VSCode bother me:
import { AppState } from '@store/index';
But when I compile the application I get this warning:
The following changes are being made to your tsconfig.json file:
- compilerOptions.paths must not be set (aliased imports are not supported)
And it bombs saying it cannot find the reference:
TypeScript error in C:/xyz.tsx(2,26):
Cannot find module '/store'. TS2307
Is there any workaround or it is not supported by create-react-app --typescript
?