fix: fix export for React Native and Browserify#7386
Merged
jasonsaayman merged 1 commit intoaxios:v1.xfrom Feb 10, 2026
Merged
Conversation
Browserify and React Native projects (that aren't using `unstable_enablePackageExports`) use the `main` field as the package entrypoint. A recent PR (axios#5756) updated `main` to use a CommonJS bundle for Node.js, which caused Browserify and React Native projects to use the Node.js bundle. This led to many reports of broken React Native builds. This has been fixed by adding an entry to `browser` and `react-native` to re-map the Node.js CommonJS bundle to the browser CommonJS bundle.
3a47986 to
c188c0a
Compare
7 tasks
|
When is this fix expected to be releasing ?? @jasonsaayman |
|
When is this going to be release ? |
|
@jasonsaayman Can we get a new release with this? |
Member
|
yeah will be doing soon thanks, just want to see if can add a couple more additions to that release |
it would be really helpful if we get it soon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Browserify and React Native projects (that aren't using
unstable_enablePackageExports) use themainfield as the packageentrypoint. A recent PR (#5756) updated
mainto use a CommonJS bundle for Node.js, which caused Browserify and React Native projects to use the Node.js bundle. This led to many reports of broken React Native builds.This has been fixed by adding an entry to
browserandreact-nativeto re-map the Node.js CommonJS bundle to the browser CommonJS bundle.Fixes #7357
Summary by cubic
Remaps the Node.js CJS entry to the browser CJS bundle for Browserify and React Native so they don’t import the Node build. Fixes #7357 and resolves RN build breakage introduced by the updated main field.
Description
Testing
Written for commit c188c0a. Summary will update on new commits.