When i try to import component like this
import { Container } from '@/components/container/Container';
It shows me error: Module not found: Error: Can't resolve '@/components/container/Container'
This is my tsconfig.json
{
"compilerOptions": {
"target": "es2015",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"typeRoots": ["node_modules/@types"],
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@/public/*": ["./public/*"]
}
},
"exclude": ["node_modules"],
"include": ["typings.d.ts"],
}
react version is 18
How to solve problem, so i want to use @ instead of ..
I try to make all paths look like alias @ to ./src path