Skip to content

fix: avoid relying on global fetch#514

Open
KazariAI wants to merge 1 commit into
nuxt:mainfrom
KazariAI:fix/import-fetch
Open

fix: avoid relying on global fetch#514
KazariAI wants to merge 1 commit into
nuxt:mainfrom
KazariAI:fix/import-fetch

Conversation

@KazariAI

Copy link
Copy Markdown

Nuxt PR nuxt/nuxt#35790 stopped installing $fetch on globalThis in the client when it is otherwise unused.

The runtime plugin still read that global during setup, so this uses useRequestFetch() to obtain Nuxt's configured fetch instance while preserving compatibility with existing Nuxt releases.


This pull request was created with assistance from a code agent.

@KazariAI KazariAI closed this Jul 26, 2026
@KazariAI KazariAI reopened this Jul 26, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 26, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@nuxt/icon@514

commit: 09a4bae

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a7429793-454c-40bb-8d46-ea659b93374f

📥 Commits

Reviewing files that changed from the base of the PR and between fe6a78a and 09a4bae.

📒 Files selected for processing (1)
  • src/runtime/plugin.ts

📝 Walkthrough

Walkthrough

The runtime plugin now imports useRequestFetch() and initializes a local $fetch within setup(). The resulting request-aware fetch function is used by the plugin flow, including custom icon loading.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title reflects the main change: stopping reliance on a global fetch instance.
Description check ✅ Passed The description matches the change and explains the Nuxt compatibility issue being addressed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant