I'm trying to make the import file paths in my react app absolute.
(EDIT: I'm trying to make this:
import fetchAPI from "../../util/api"
to this
import fetchAPI from "util/api"
)
I've seen solutions to this by using the jsconfig.json as such
{
"compilerOptions": {
"baseUrl": "src"
},
"include": ["src"]
}
The way I understand it, this only makes the file paths in .js files absolute. Unfortunately the wide majority of the files in the project are .jsx, is there a way to make the file paths in these absolute?
Thanks in advance :)