README
What is this
This is a ttypescript transformer:
- append
.js
after every top-levelimport
s (dynamic ones currently not support)
Usage
- Install
typescript
,ttypescript
, and this transformernpm install --save-dev typescript ttypescript @build-script/typescript-transformer-dual-package
- Add the transformer to your
tsconfig.json
:{ "compilerOptions": { // ... other options "plugins": [ { "transform": "@build-script/typescript-transformer-append-js-extension" } ] } }
- Compile with
ttsc
, instead oftsc
(package tools likewebpack
also support ttypescript, please refer to their docs)npm install ttypescript ttsc -p path/to/tsconfig.json