Answer the question
In order to leave comments, you need to log in
Is there a shorter way to write file paths?
Good afternoon! A project in the src folder, in which the following hierarchy is:
src
-assets
--images
-components
--pages
-scripts
And to get an image in a file from the Pages folder, for example, I have to write something like this:
"./../ ../assets/images/img.png"
Is there a way to go directly from the root (in this case the src folder) - "/assets/images/img.png" ?
Answer the question
In order to leave comments, you need to log in
Good afternoon! You can write like this:<img src="../images/img.png" />
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question