DEV Community

Discussion on: Using absolute imports in React app

Collapse
 
dominikilnicki profile image
Dominik Ilnicki

Hi, that solution works only with projects created using create-react-app in version 3 (released in April 2019). If your project was bootstrapped with v2 you can use old school way to achieve absolute imports. Create .env file with that line NODE_PATH=src/. That should work for you.