DEV Community

Discussion on: 5 Essential Practices for Front-End Developers (React Edition)

Collapse
 
darshan260802 profile image
darshan260802 • Edited

I think for absolute paths he ment @ rule paths provided by TS which will be resolved while compiling by TS and for a project paths starting from SRC will always going to be same in all machines for same project

when he says absolute path
He means this -> "src/component/home.ts"
He doesn't mean this -> "D:/work/react-projects/my-test-project/src/component/home.ts"

Collapse
 
wraith profile image
Jake Lundberg

I can certainly see what the author meant to convey here as you describe. However, the term "absolute path" has a very specific meaning:

Absolute Path is the hierarchical path that locates a file or folder in a file system starting from the root.

What you and the author are referring to actually has different names depending on the tool you're using.

In Next.js, these are called Absolute Imports.
In Svelte, these are called Aliases.
They are also called Aliases in Nuxt.js

I hope this adds some clarity to my origin comment 😃