Absolute Import
Setting up Absolute Imports with jsconfig
Absolute Import is a great way to clean up your imports
Example
This is the usual way of importing with ..
operator to go back 1 folder:
And this is the clean import using absolute import:
For Next.js
Add this to root with the filename of jsconfig.json
Or you can just use my Next.js & Tailwindcss starter template
For Create React App
Add this to root with the filename of jsconfig.json
And in craco.config.js