Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
/ TS-ES-Node Public archive

Work in progress ts-node like module that uses the TypeScript API & the new experimental loaders in Node to transpile as node loads the files

Notifications You must be signed in to change notification settings

EntraptaJ/TS-ES-Node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TS-ES-Node

This module has been rewritten and moved to @K-FOSS/TS-ESNode

This is an experimental Node.JS ESModule loader hook to transpile TypeScript into ESNext during module resolution

npm install
npm run try

This is only tested to work on Node v13.5.0. I will test other versions soon, likely setup proper automated testing.

Usage in Projects

This is is only useful if your using ESNext modules in TypeScript and emitting as ESNext, and are using "type": "module" in your package.json if not then you likely want (ts-node)[https://github.com/TypeStrong/ts-node]

I have a package published to the NPM GitHub Package registry. NPM Install Instructions

First you'll need to get my package

npm install -D @kristianfjones/ts-es-node

To use this to run your TypeScript ESNext Modules in Node.JS without having to compile first setup a NPM script similar to this

  "scripts": {
    "dev": "node --experimental-loader @kristianfjones/ts-es-node  --es-module-specifier-resolution=node --experimental-modules  --experimental-vm-modules src/index.ts"
  }

Plans

I want to cache the .ts file imports somewhat.

See if it is possible to get HMR working

Setup Jest Testing

Setup GitHub actions to publish to Github Package Registry along with automated testing.

About

Work in progress ts-node like module that uses the TypeScript API & the new experimental loaders in Node to transpile as node loads the files

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published