@aliser/ts-transformer-append-js-extension
v1.0.7
Published
A TypeScript transformer for use with ts-patch that will append the JS extension to all relative imports that have no extension.
Downloads
309
Maintainers
Readme
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
- Install
ts-patch
using the instruction from here - Add the transformer to
tsconfig.json
{
"compilerOptions": {
"plugins": [
{ "transform": "@aliser/ts-transformer-append-js-extension" }
]
},
}
- Build your project using
tsc
or run it usingts-node
.