Skip to content

A TypeScript transformer for use with ts-patch that will append the JS extension to all relative imports that have no extension.

License

Notifications You must be signed in to change notification settings

murolem/ts-transformer-append-js-extension

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Commitizen friendly Build

Eliminates a need for specifying .js extension for relative imports of TypeScript files.

Based on typescript-transformer-append-js-extension package by @Zoltu, now using ts-patch for transformer capability.

Installation

Install using npm:

npm i -D @aliser/ts-transformer-append-js-extension

Usage

  1. Install ts-patch using the instruction from here.
  2. Add the transformer to tsconfig.json:
{
  "compilerOptions": {
    "plugins": [
      { "transform": "@aliser/ts-transformer-append-js-extension" }
    ]
  },
}
  1. Build your project using tsc or run it using ts-node.

About

A TypeScript transformer for use with ts-patch that will append the JS extension to all relative imports that have no extension.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%