-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add ability to disable Node polyfills #7374
Comments
For reference, Node 18 has been available since April, 2022. However, AWS Lambda does not yet support Node 18. Based on past history, it usually takes them about a year to add support. |
(we should add a multipart test before attempting this again) |
After discussion, we agreed to add a |
Removing from the 1.0 milestone since this update won't affect Kit itself |
Looks like AWS Lambda now supports node 18 |
I just tried Netlify. It still uses Node 16 by default, but does support Node 18. |
We are using |
|
Describe the problem
We've been using Mock Service Worker to mock out requests to our backend. We use the Node interceptor for it so that the mocks work in both SSR and on the client. However, when we recently started updating our SvelteKit version, we noticed that this stopped working. We think that this is due to the Undici polyfill, which appears to completely avoid standard global Node modules like
http
andhttps
.In addition, the error logs for these mocked libraries and significantly harder to read and debug, as they use a few tricks for scheduling that make the original call site difficult to find.
Describe the proposed solution
Modern versions of Node (e.g. Node 18) have all of the mocked libraries available as globals by default, so there is no need to mock them. I propose either adding an option to disable the polyfills manually, or ignoring the polyfill if a global version exists already.
Alternatives considered
None
Importance
would make my life easier
Additional Information
No response
The text was updated successfully, but these errors were encountered: