-
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
chore(remix-node): put native fetch behind config option #9198
Conversation
chore(remix-serve): default to native fetch for single-fetch
🦋 Changeset detectedLatest commit: 7cb7f93 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -37,6 +38,7 @@ module.exports = function rollup() { | |||
extensions: [".ts", ".tsx"], | |||
}), | |||
nodeResolve({ extensions: [".ts", ".tsx"] }), | |||
commonjs({ ignoreDynamicRequires: true }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't hoist dynamic require's to to the module scope to avoid loading two polyfills at startup.
@@ -4,5 +4,5 @@ module.exports = { | |||
displayName: "testing", | |||
setupFiles: [], | |||
testEnvironment: "jsdom", | |||
setupFilesAfterEnv: ["@testing-library/jest-dom", "./jest.setup.js"], | |||
setupFilesAfterEnv: ["./jest.setup.js", "@testing-library/jest-dom"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order here matters due to testing-library setting up globals badly if they don't exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a minor update to the changeset so it reminds me to make the right updates to the release notes
chore(remix-serve): default to native fetch for single-fetch
Since there are some quite major differences between our, and native fetch implementations we have opted to keep our polyfill around for existing apps until the next major to avoid introducing unexpected issues for users specifically around the garbage collection behavior of response bodies.
Due to reliance on a more spec compliant headers implementation for single fetch, single fetch opts you into native fetch.