TypeScript Module Loader
- Supports
node <file>
usage - Supports ESM
--loader
usage† - Supports
--require
hook usage - Optional configuration file for per-extension customization
† The ESM Loader API is still experimental and will change in the future.
# install as project dependency
$ npm install --save-dev tsm
# or install globally
$ npm install --global tsm
Note: Refer to
/docs/usage.md
for more information.
# use as `node` replacement
$ tsm server.ts
# forwards any `node` ENV or flags
$ NO_COLOR=1 tsm server.ts --trace-warnings
# use as `--require` hook
$ node --require tsm server.tsx
$ node -r tsm server.tsx
# use as `--loader` hook
$ node --loader tsm main.jsx
MIT © Luke Edwards