You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of node v20, loader hooks are executed in a separate isolated thread
environment. As a result, they are unable to register the
`require.extensions` hooks in a way that would (in other node versions)
make both CJS and ESM work as expected.
By adding a `globalPreload` method, which *does* execute in the main
script environment (but with very limited capabilities), these hooks can
be attached properly, and `--loader=ts-node/esm` will once again make
both cjs and esm typescript programs work properly.
0 commit comments