Skip to content

fix(runtime): add multi-app support for global var __NUXT__ - #858

Open
nicolaspayot wants to merge 7 commits into
nuxt:mainfrom
nicolaspayot:feat/multi-app-support
Open

fix(runtime): add multi-app support for global var __NUXT__#858
nicolaspayot wants to merge 7 commits into
nuxt:mainfrom
nicolaspayot:feat/multi-app-support

Conversation

@nicolaspayot

@nicolaspayot nicolaspayot commented May 21, 2024

Copy link
Copy Markdown

resolves #1521

This PR adds multi-app support for global variable win.__NUXT__.

These changes are related to the multi-app issue in nuxt: nuxt/nuxt#21635 and required for the following draft PR: nuxt/nuxt#27263.

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. enhancement New feature or request vitest-environment labels May 21, 2024
@yamachi4416
yamachi4416 requested a review from danielroe as a code owner August 1, 2026 05:14
@socket-security

socket-security Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednuxt-nightly@​5.0.0-29761125.c6a7d2b68110010097100

View full report

@pkg-pr-new

pkg-pr-new Bot commented Aug 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/test-utils@858
npm i https://pkg.pr.new/vitest-environment-nuxt@858

commit: d84d63a

@yamachi4416 yamachi4416 changed the title feat: add multi-app support for global var __NUXT__ fix(runtime): add multi-app support for global var __NUXT__ Aug 1, 2026
@coderabbitai

coderabbitai Bot commented Aug 1, 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: c76f850a-33c5-4a10-b58e-ed10c00ff218

📥 Commits

Reviewing files that changed from the base of the PR and between b883d90 and d84d63a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • examples/multi-app/nuxt.config.ts
  • examples/multi-app/package.json
  • examples/multi-app/vitest.config.ts
💤 Files with no reviewable changes (1)
  • examples/multi-app/package.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • examples/multi-app/nuxt.config.ts
  • examples/multi-app/vitest.config.ts

📝 Walkthrough

Walkthrough

The change adds multi-app Nuxt runtime state handling through nuxtAppId and nuxtFuture environment options. It adds a multi-app example with a counter page, composable, Vitest configuration, and Nuxt and browser tests. It also adds application shells and corrects app.vue import aliases in the workspace example.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: multi-app support for the global NUXT variable.
Description check ✅ Passed The description directly explains the multi-app support change and links it to the reported Nuxt test-utils issue.
Linked Issues check ✅ Passed The changes pass Nuxt multi-app settings into the test environment, support app-scoped NUXT, and add multi-app Vitest coverage for issue #1521.
Out of Scope Changes check ✅ Passed The example application, configuration, and tests are directly related to validating the multi-app runtime fix.
✨ 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

enhancement New feature or request size:S This PR changes 10-29 lines, ignoring generated files. vitest-environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nuxt multiApp breaks nuxt/test-utils

2 participants