JSPM

@aliser/ts-transformer-append-js-extension

1.0.7
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 114
  • Score
    100M100P100Q102385F
  • License Unlicense

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

Package Exports

  • @aliser/ts-transformer-append-js-extension
  • @aliser/ts-transformer-append-js-extension/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@aliser/ts-transformer-append-js-extension) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.