Using absolute imports with VSCode and create-react-app

Felipe Lima
Sep 23, 2018 · 2 min read
# Component B
import ComponentA from ‘../../../folder/ComponentA’;
# Component C
import ComponentA from ‘../folder/ComponentA’;
# Component B
import ComponentA from ‘components/folder/ComponentA’;
# Component C
import ComponentA from ‘components/folder/ComponentA’;

Configuring create-react-app

Configuring VSCode

Configuring VSCode Auto Import

Felipe Lima

Written by

ScaffoldHub — Web App Generators — https://scaffoldhub.io

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade