@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.
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-extensionUsage
- Install
ts-patchusing the instruction from here - Add the transformer to
tsconfig.json
{
"compilerOptions": {
"plugins": [
{ "transform": "@aliser/ts-transformer-append-js-extension" }
]
},
}- Build your project using
tscor run it usingts-node.
