1.3.1 • Published 5 months ago
tesm-node v1.3.1
tesm-node
A thin wrapper around ts-node-esm that adds support for tsconfig paths and importing files without file extensions when developing in TypeScript with ESM.
Install
# Locally in your project
npm i -D typescript ts-node tesm-node
# Or globally
npm i -g typescript ts-node tesm-node
# If using tsconfig paths
npm i -D tsconfig-paths
# Depending on configuration, you may also need types
npm i -D @types/node
Usage
Because this is just a wrapper around
ts-node, it retains nearly all of it's API. Just replace ts-node
with
tesm-node
.
# Basic usage.
tesm-node src/script.ts
# With tsconfig-paths
tesm-node src/script
# With the loader flag
node --loader tesm-node script.ts