Get rid of long paths

Get rid of long paths

Get rid of long paths

If you are using paths and the project it’s getting bigger you might want to consider using absolute paths:

.env 
src/ 
    components  
        ├── App.js  
App.test.js => import App from '../App';

create a .env file under the root directory of your node app: NODE_PATH=src/

App.test.js => import App from 'components/App';

This way you’ll not have to worry again about ugly paths and you can move files within src folder freerly.

Related Posts