0.2.2 • Published 3 years ago
typescript-transform-aliases v0.2.2
typescript-transform-aliases
Transform aliases in TypeScript files.
Install
npm i -D typescript-transform-aliases
# or
yarn add -D typescript-transform-aliasesUsage
With ttypescript or ts-patch
{
"compilerOptions": {
"plugins": [
{
"transform": "typescript-transform-aliases",
"after": true,
"afterDeclarations": true,
"aliases": {
// for example
"^lodash-es$": "lodash"
}
}
]
}
}Similar packages
Both typescript-transform-paths and @zerollup/ts-transform-paths transform the paths field in tsconfig.json, which are usually aliases for relative paths;
ts-transform-import-path-rewrite could transform any aliases but does not support require or dynamic imports.