typescript-transform-aliases
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

typescript-transform-aliases

Transform aliases in TypeScript files.

Install

npm i -D typescript-transform-aliases
# or
yarn add -D typescript-transform-aliases

Usage

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.

Readme

Keywords

Package Sidebar

Install

npm i typescript-transform-aliases

Weekly Downloads

1

Version

0.2.2

License

ISC

Unpacked Size

8.08 kB

Total Files

5

Last publish

Collaborators

  • cyansalt