diff --git a/packages/register/esm-register.mts b/packages/register/esm-register.mts index 8edbcc65d..497c3cecb 100644 --- a/packages/register/esm-register.mts +++ b/packages/register/esm-register.mts @@ -1,4 +1,3 @@ -import { register } from 'node:module' -import { pathToFileURL } from 'node:url' +import { register } from 'node:module'; -register('@swc-node/register/esm', pathToFileURL('./').toString()) +register('@swc-node/register/esm', import.meta.url)