Closed vicb closed 2 months ago
Nice start dear @vicb.
Next step, we need to create src/runtime/node/module/$cloudflare.ts
that reexports index.ts
except overriding createRequire
to pick from process.getBuiltinModule('module')
. (See this as an example).
I am putting PR in WIP state until changes on both side are finalized.
Nice start dear @vicb.
Thanks Pooya ;)
I have tried to do something. The idea is to be able to merge the PR even before the workerd implementation is updated.
I probably got a few things wrong, but I'll learn...
Thanks for the review
Is the last version better?
Thanks ❤️
LGTM only we should check
process.getBuiltinModule
esbuild issue with @IgorMinar
I think using process.getBuiltinModule
is ok, it is unpatched:
Confirmed that it WAI on a simple wrangler pjt
Related
workerd
PR: https://github.com/cloudflare/workerd/pull/2636This PR changes
module
to be an hybrid polyfill and use the workerd available method implementations.Is there anything else to change/update?
Thanks!
/cc @pi0