ts-import-transformer

1.1.0 • Public • Published

ts-import-transformer

Transform import and export paths to work on client and server environments.

Transforms

  • User-configured path replacements
  • Fix baseUrl relative paths
  • Add .js extension

Install

npm install --save-dev typescript ttypescript ts-import-transformer

Config

In this example, we enable the plugin and configure a path replacement for the superstruct library within our tsconfig.json:

{
  "compilerOptions": {
    "plugins": [
      {
        "transform": "ts-import-transformer",
        "superstruct": "./assets/superstruct/index"
      }
    ]
  }
}

Compile

npx ttsc -p tsconfig.json

/ts-import-transformer/

    Package Sidebar

    Install

    npm i ts-import-transformer

    Weekly Downloads

    1

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    5.56 kB

    Total Files

    3

    Last publish

    Collaborators

    • winton