React & Modern Frontend (445 Qs)•Part 11: Legacy Architecture, Migration Patterns & Historical Internals (354 - 445)
How to avoid using relative path imports in create-react-app?
Create a file called .env in the project root and write the import path:
ini
NODE_PATH=src/app
scss
After that restart the development server. Now you should be able to import anything inside `src/app` without relative paths.