-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Labels
type/refactorAddress tech debt, internal incidental complexityAddress tech debt, internal incidental complexity
Description
Would like to refactor and centralize a libs dir that the rest of the codebase can reference via ~<module-name>. About the feature: https://dev.to/larswaechter/path-aliases-with-typescript-in-nodejs-4353. https://www.typescriptlang.org/docs/handbook/module-resolution.html
This would require TS Config paths config like so:
"compilerOptions": {
"baseURL": "./src",
"paths": {
"~*": ["./lib/*"]
}
}Problem is TS does not translate the mapping at build time. Surprisingly.
Some tools trying to help in this space listed at:
But they are runtime oriented. We would want a build time option, since we're a library and not an app.
One build time option is this Go-based lib https://github.com/joseluisq/go-tspath. Introducing a non-node dep for a small use-case like this though doesn't feel right.
Build our own tool?
durdenx
Metadata
Metadata
Assignees
Labels
type/refactorAddress tech debt, internal incidental complexityAddress tech debt, internal incidental complexity