ts-node icon indicating copy to clipboard operation
ts-node copied to clipboard

feat(esm): initialize hook - register(_,[_,tsNodeOptions])

Open calebboyd opened this issue 1 year ago • 0 comments

Opening for feedback!

It would be nice to pass ts-node options via the node register call.

Enabling an entry point like the following:

import { register } from 'node:module'

register(import.meta.resolve('ts-node/esm'), {
  data: {
    swc: true,
    preferTsExts: true,
  },
})

await import('./main.js')

calebboyd avatar Feb 22 '24 21:02 calebboyd