DEV Community

Discussion on: Absolute imports in Create React App

Collapse
 
dorklord23 profile image
Tri R.A. Wibowo

Weird. This doesn't work for me :/

Collapse
 
winkee01 profile image
winkee01

try restart react app?

Collapse
 
dorklord23 profile image
Tri R.A. Wibowo

it turned out I need to set "baseUrl": "./src" instead of "baseUrl": "src" in my case.

Collapse
 
mr_frontend profile image
Michał Bednarz

What's the error? Is it during bundling or in runtime?

Collapse
 
dorklord23 profile image
Tri R.A. Wibowo • Edited

No error log per se but the absolute import just didn't work so I need to resort to set NODE_PATH='src/' in .env to make it work which is already deprecated.