I have a ReactJS project called my-app, that was created using the Redux+TS template.
It's folder structure is like this:
node-modules
public
src/
components/
Controller.jsx
App.jsx
index.jsx
jsconfig.json
package-lock.json
package.json
App.jsx:
import React from "react";
import Controller from "components/controller";
jsonfig.json:
{
"compilerOptions": {
"baseUrl": "src"
},
"include": ["src"]
}
I'm trying to import the Controller component into my App component using absolute imports, but whenever I compile it, I get an error:
Compiled with problems:
ERROR IN ./src/App.jsx
Module not found: Can't resolve 'components/Controller' in '<container-directory>\my-app\src