Open
Description
Describe the bug
After setting up, and using path mappings in tsconfig.json
file, webpack gives module resolution error.
Module not found: Error: Can't resolve '@module' in '/path/frontend/src/file'
@ ./src/App.tsx 7:0-46 22:30-42
@ ./src/index.tsx 7:0-24 11:33-36
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
Webpack resolve, alias
Typescript path mappings
Module not found: Error: Can't resolve '@module' in 'path/to/file'
Environment
Using yarn v1.22.17
Node: v14.17.6
OS: MacOS 12.2.1
CPU: Apple M1
Steps to reproduce
yarn create react-app frontend --template typescript
- Add
baseUrl
andpaths
tocompilerOptions
intsconfig.json
file yarn start
Expected behavior
Webpack should get module aliases from tsconfig.json
file.
Actual behavior
Webpack gives Module not found
error.