Closed jacogr closed 1 year ago
I'm getting the same exception.
My project is using module/moduleResolution=NodeNext. Is that already supported by SWC-node?
@jacogr What is the exact version of Node.js you have?
The above was Node 18.14 - same issue on latest 18.15.
The return type is incorrect (as introduced in Node 16.12 with the latest loader API).
I do believe the merged https://github.com/swc-project/swc-node/pull/698 fixes this issue (looking at the changes made), so can be closed.
Really happy to see the register/esm appearing. This is brilliant.
I'm using the latest Node LTS 18 and the currently-released 1.6.2.
Using this combo, I receive the following error when passing
--loader @swc-node/register/esm
on a project -Based on the (current) Node loader documentation the return should be something like
url: new URL(url).href
(using the as-is code)