Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Nishant Kohli nishkohli96

🎯
Focusing
View GitHub Profile
@nishkohli96
nishkohli96 / aliasimports.md
Last active Dec 25, 2020
Alias Imports in create-react-app without using Eject
View aliasimports.md

Hi There 👋

In this article, I would love to share with you how to use alias imports in create-react-app without using yarn eject.

If you are unaware of Alias Imports it basically means renaming the absolute paths of your project folders, so that you can use the renamed path to import one module into another. So in other words we will try to resolve your imports from

import { Something } from '../../../components/SthComponent;

to