GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: resolveConfig arrow function breaks under webpack + babel transforms by sapirbaruch · Pull Request #10891 · axios/axios

Conversation

@sapirbaruch

@sapirbaruch sapirbaruch commented May 14, 2026 •
edited by cubic-dev-ai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions
@sapirbaruch
fix: convert resolveConfig default export to named function for webpa…
bb125c8
…ck/babel compatibility
@sapirbaruch
sapirbaruch requested a review from jasonsaayman as a code owner May 14, 2026 08:43
cubic-dev-ai[bot]
cubic-dev-ai Bot reviewed May 14, 2026
View reviewed changes

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
@jasonsaayman jasonsaayman assigned sapirbaruch May 14, 2026
@jasonsaayman jasonsaayman added priority::medium labels May 14, 2026
jasonsaayman

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasonsaayman
Merge branch 'v1.x' into fix/v1x-resolve-config-webpack-babel-export
eb5978c
jasonsaayman
jasonsaayman approved these changes May 24, 2026
View reviewed changes
@jasonsaayman
jasonsaayman merged commit b0771a3 into axios:v1.x May 24, 2026
26 checks passed

Uh oh!

There was an error while loading. Please reload this page.

jasonsaayman added a commit that referenced this pull request May 28, 2026
@sapirbaruch @jasonsaayman
fix: convert resolveConfig default export to named function for webpa…
69af68a
…ck/babel compatibility (#10891)

Co-authored-by: Jay <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cubic-dev-ai cubic-dev-ai[bot] cubic-dev-ai[bot] left review comments
@jasonsaayman jasonsaayman jasonsaayman approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@sapirbaruch sapirbaruch

Labels

None yet

Projects

None yet

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.

2 participants

@sapirbaruch @jasonsaayman
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.