@cspotcode
Continuing the discussion from #1007.
CommonJS has the file shortcut ts-node/register/transpile-only for installing the TypeScript loader without type checking. An ESM loader which has the equivalent functionality should be created and exposed to the end user.
| exportconst{resolve, getFormat, transformSource}=esm.registerAndCreateEsmHooks() |
The code from esm.mjs can be duplicated in a new file, but with the transpileOnly flag set:
exportconst{resolve, getFormat, transformSource}=esm.registerAndCreateEsmHooks({transpileOnly: true})What should the loader filename look like? There is ts-node/esm.mjs, should it be ts-node/esm/transpile-only.mjs?
@cspotcode
Continuing the discussion from #1007.
CommonJS has the file shortcut
ts-node/register/transpile-onlyfor installing the TypeScript loader without type checking. An ESM loader which has the equivalent functionality should be created and exposed to the end user.ts-node/esm.mjs
Line 7 in ce7c323
The code from esm.mjs can be duplicated in a new file, but with the
transpileOnlyflag set:What should the loader filename look like? There is
ts-node/esm.mjs, should it bets-node/esm/transpile-only.mjs?