I have one problem with imports on React App when I add imports since src folder. I want to make this imports because when I am using visual studio code I go to other files through one click on the import.
Using ViteJS launcher.
.
├── index.html
├── jsconfig.json
├── package-lock.json
├── package.json
├── src
│ ├── App.jsx
│ ├── context
│ │ └── index.jsx
│ ├── index.jsx
└── vite.config.js
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"src/*": ["src/*"]
}
}
}
// Import I want to use
import { Provider } from "src/context";
// Import without errors
import { Provider } from "context";
[vite] Internal server error: Failed to resolve import "src/context" from "src/index.jsx". Does the file exist?