How to use path aliases
See original GitHub issueI would like to use absolute path aliases but couldn’t figure out how to set it up with this project
I would like a path like this:
import { formatNumber } from "../../../utils"
be like this:
import { formatNumber } from "@utils"
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Improving code readability with Path Aliases - Medium
Path aliasing or aliases are preconfigured names used to replace long paths in files and resolve to certain directories on a codebase. There ......
Read more >Path aliases with TypeScript in Node.js - DEV Community
In TypeScript you can avoid these "bad" looking imports with the help of path aliases. With path aliases you can declare aliases that...
Read more >Simpler Typescript paths with path aliases - Christian Lüdemann
Typescript aliases allow you to specify a word/alias for an absolute path in the application from which you can resolve paths from absolutely....
Read more >How To Configure Path Aliases With TypeScript
A path alias is a user-defined name that replaces a long relative path. Non-aliased relative import import { IUser } from "../../../../../.
Read more >Path aliases with TypeScript in Node.js - Level Up Coding
In this article, I will walk you through setting up path aliases in your TypeScript project and show you how to clean up...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll close this and further updates will be added to #409.
@egoist I have created a repo tsup-node-esm which replicates my issue.
I have realised that if I move
tmp
package todependencies
, it all seems to work out fine.I do see that the code gets inlined during transpilation. Is there anyway to avoid that?