Bundlers such as webpack have an option to replace your relative paths with aliases. I've seen some articles and tutorial where they use either @
prefix or capitalizing the first letter of the relative path, like App/
or Components/
.
For me I started using @
prefixes at the beginning but then started to experiment around with #
prefixes instead for my projects.
// webpack config
resolve: {
alias: {
'#app': './src'
}
}
I'm interested to know what you use as your webpack (or any other bundler) aliases? Or if you don't use them at all?
Top comments (1)