I use react through CRA with typescript. Here is my config from tsconfig.json
{"compilerOptions": {"target": "es5","lib": ["dom","dom.iterable","esnext" ],"baseUrl": ".","paths": {"my-lib": ["./node-modules/my-lib/src" ],"my-lib/*": ["./node_modules/my-lib/src/*" ] },"allowJs": true,"skipLibCheck": true,"esModuleInterop": true,"allowSyntheticDefaultImports": true,"strict": true,"forceConsistentCasingInFileNames": true,"module": "esnext","moduleResolution": "node","resolveJsonModule": true,"isolatedModules": true,"noEmit": true,"jsx": "react" },"include": ["src" ] }
However, after running the npm start
script, the" paths "setting automatically disappears from the config.
Please help me solve this problem. Thanks.