remix-esbuild-override
remix-esbuild-override copied to clipboard
Node.js compatibility for Cloudflare Workers
https://blog.cloudflare.com/workers-node-js-asynclocalstorage/
Today it was announced that node-compatible polyfill has been included in the Cloudflare Workers runtime. This means that the role of this library is nearing its end. I am very happy about this. The edge runtime is definitely evolving.
I haven't tried it out yet, but if the polyfill bundle is no longer needed at build time, I will archive this repository and deprecate the npm package.
If anyone tries nodejs_compat
, please report whether remix-esbuild-override is likely to continue to be needed to run certain libraries, or whether it can be confirmed to work without it.
compatibility_flags = [ "nodejs_compat" ]
While using this package to add pollyfills for certain Node APIs is a possible use-case, I don't think it's the only one. Even after Cloudflare officially releases this feature, I believe there is still a use-case for the package. I myself use it for things that would not be possible without access to esbuild config directly, like this.