GeezerVison is showing github.com — fix: resolveConfig arrow function breaks under webpack + babel transforms by sapirbaruch · Pull Request #10891 · axios/axios
Conversation
sapirbaruch
commented
May 14, 2026
•
edited by cubic-dev-ai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Ran into this while bundling an app with webpack 5 + babel. The arrow function
used as the default export in resolveConfig.js causes __WEBPACK_DEFAULT_EXPORT__
to resolve to undefined under certain babel plugin configurations (specifically
with @babel/plugin-transform-modules-commonjs and module interop settings).
Converting it to a named function export resolves the issue without any
behavioral changes.
Tested with the repro case from #10675.
Summary by cubic
Fixes an issue where resolveConfig’s default export could be undefined when bundling with webpack 5 + babel CommonJS transforms. Converts the arrow default export to a named function and re-exports it as default; no behavior or API changes.
Description
- Change: convert arrow default export to named
resolveConfig and default-export it.
- Reason:
@babel/plugin-transform-modules-commonjs can break arrow default exports in webpack 5, causing __WEBPACK_DEFAULT_EXPORT__ to be undefined.
- Context: Verified with the repro; merged latest
v1.x into this branch with no additional code changes.
- Docs: none required; optional note in
/docs/ about babel CommonJS interop and default exports.
- Semver: patch.
Testing
- No test changes; existing tests cover
resolveConfig.
- Recommended: add an integration build test using
webpack 5 + @babel/plugin-transform-modules-commonjs to prevent regressions.
Written for commit eb5978c. Summary will update on new commits. Review in cubic
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
No issues found across 1 file
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.