mirror of
https://github.com/hanzoai/ts-node.git
synced 2026-10-30 19:36:25 +00:00
* WIP * restore .d.ts file * add notes and todos * strip down node-internal-modules-cjs-loader to match main branch; will build it back up from here * committing all local stuff * update * it kinda works! * fix CI? * fix? * fix? * fix * bump up to node 18 cuz why not * test matrix: replace node17 with node18 * fix node12 test failure * fix for prior hooks API * tweak * fix * teach node environment resetter to re-sort require.extensions * fix * fix * fix * windows fix? * Addressing TODOs * sync another raw file with upstream * Improve reuse / DI within node ESM stuff * cleanup node internalBinding stuff * Adding hint when ts-node is ignoring a file that you might want it to compile; addressing todos; adding a new one * Add tests for self-imports and empty package.json manifests importing a root index.* file * fix * fix node12
9 lines
380 B
JavaScript
9 lines
380 B
JavaScript
import { fileURLToPath } from 'url';
|
|
import { createRequire } from 'module';
|
|
const require = createRequire(fileURLToPath(import.meta.url));
|
|
|
|
// TODO why use require() here? I think we can just `import`
|
|
/** @type {import('./dist/child-loader')} */
|
|
const childLoader = require('./dist/child/child-loader');
|
|
export const { resolve, load, getFormat, transformSource } = childLoader;
|