aiji42 / remix-esbuild-override

This is a library that makes it possible to change the configuration values of the Remix compiler (esbuild).
MIT License
89 stars 10 forks source link

Node.js compatibility for Cloudflare Workers #41

Open aiji42 opened 1 year ago

aiji42 commented 1 year ago

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" ]
repository commented 1 year ago

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.