-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remix v1.16.0 - Unnecessary Node polyfills added for Oxygen/Workers. #6348
Comments
We just published version |
Thanks! I can confirm that #6562 fixes this issue. Should we close it now or wait until 1.17.1 is released? |
Closed by #6562 |
🤖 Hello there, We just published version Thanks! |
What version of Remix are you using?
1.16.0
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
I think this was introduced in #5274 , and is probably related to #6280 and its linked issues/PRs. I'm still writing this issue to show that it also affects Worker environments
You can reproduce the issue when building a project with a typical config for Oxygen or CFW:
Expected Behavior
The resulting server/worker bundle shouldn't contain Node polyfills. Or, at least, they shouldn't make the bundle crash when running on a Worker environment.
Actual Behavior
Many Node polyfills are added to the JS and Server bundles, thus increasing the size by ~60K non-minified. One of the polyfills is also accessing a global
navigator
variable, making the process exit withnavigator is not defined
in Worker environments:I'm not sure if the solution is modifying this conditional and skip when
serverPlatform === 'neutral'
, or perhaps passing different options to esbuild-plugin-polyfill-node since it seems to have a different default behavior compared to the old @esbuild-plugins/node-modules-polyfill.The text was updated successfully, but these errors were encountered: