I have a React project with a structure like this:
- src
- Components
- My_component_1
- My_component_2
- Images
- image_1
- image_2
- Pages
- page_1
- page_2
- Components
I'd like to know if exists a way to register a folder as a component (e.g @Images or @Components for all images or components). In this way, if I'm working on sub-component of page 1, I will not need to write:
import component from "../../Components/My_component_1
but
import {My_component_1} from '@Components'
and avoid to manage relative url and different URLs in different components.