Repository navigation
Conversation
This comment was marked as duplicate.
This comment was marked as duplicate.
50c853d to
a1c0f05
Compare
@nuxt/kit
@nuxt/nitro-server
nuxt
@nuxt/rspack-builder
@nuxt/schema
@nuxt/vite-builder
@nuxt/webpack-builder
commit: |
c2f7b7f to
3a29590
Compare
5581615 to
1c338ba
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
test/e2e/vapor.test.ts (1)
144-226: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winInconsistent
toHaveNoErrorsOrWarnings()coverage invapor async datatests.Within this describe block, tests at L134-142 and L155-165 assert
expect(page).toHaveNoErrorsOrWarnings(), but the tests at L144-153, L167-173, L175-186, L188-198, L200-210, L212-218 and L220-226 don't. Unlike the<NuxtErrorBoundary>tests further down (which intentionally trigger errors), nothing here should produce console errors/warnings, so the missing assertions leave a gap that could hide hydration/console regressions introduced by future vapor async-data changes.Example fix for one of the affected tests
test('ssr + hydration of awaited useAsyncData in a vapor page, with refresh', async ({ page, goto }) => { await goto('/async-data') await expect(page.getByTestId('data-greeting')).toHaveText('hello from api') await expect(page.getByTestId('data-status')).toHaveText('success') const countText = await page.getByTestId('data-count').textContent() await page.getByTestId('refresh-button').click() await expect(page.getByTestId('data-count')).not.toHaveText(countText!) await expect(page.getByTestId('data-status')).toHaveText('success') + + expect(page).toHaveNoErrorsOrWarnings() })Apply the same pattern to the other affected tests in this block.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/e2e/vapor.test.ts` around lines 144 - 226, Add expect(page).toHaveNoErrorsOrWarnings() to each affected vapor async-data test in this describe block, including the SSR/hydration, navigation, lazy-data, async-setup, prefetch, refresh, and vdom-to-vapor cases. Keep the existing assertions unchanged and apply the same console-error/warning check already used by the neighboring tests.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/nuxt/src/app/components/nuxt-teleport-island-component.ts`:
- Around line 48-53: The unsupported Vapor-slot check in
nuxt-teleport-island-component.ts must short-circuit before slots.default()[0]
and slot.type are accessed; retain the development diagnostic while routing
unsupported slots through the existing fallback/error behavior in all
environments. In client-fallback.server.ts, skip ssrRenderVNode for the same
unsupported Vapor-slot case so both sites consistently avoid VNode-only
processing.
In `@packages/nuxt/src/pages/runtime/composables.ts`:
- Around line 77-80: Update the early return in the definePageMeta runtime
warning path so it only suppresses NUXT_E1007 for Vapor route components, not
every context reported by hasInjectionContext(). Use an existing Vapor-specific
signal if available, or add coverage confirming that calls from runWithContext,
plugins, and other injection callbacks still emit the warning while valid Vapor
route components remain exempt.
In `@packages/webpack/src/presets/base.ts`:
- Around line 168-173: Update baseResolve to merge configured
webpack.resolve.alias entries with the generated ctx.alias map rather than
allowing ctx.config.resolve to replace it. Preserve the generated Vue aliases
from baseAlias while applying user aliases, with user values taking precedence
only for matching keys.
In `@pnpm-workspace.yaml`:
- Around line 53-54: Replace the broad `@vue/`* release-age exemption in the
workspace configuration with exact package/version exclusions for only the
required Vue RC packages. Keep the existing vue exemption if needed, and ensure
newly published Vue packages remain subject to minimumReleaseAge.
---
Nitpick comments:
In `@test/e2e/vapor.test.ts`:
- Around line 144-226: Add expect(page).toHaveNoErrorsOrWarnings() to each
affected vapor async-data test in this describe block, including the
SSR/hydration, navigation, lazy-data, async-setup, prefetch, refresh, and
vdom-to-vapor cases. Keep the existing assertions unchanged and apply the same
console-error/warning check already used by the neighboring tests.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 88dfef2f-4802-4be5-9bce-3ad22068421f
⛔ Files ignored due to path filters (2)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!pnpm-lock.yamltest/fixtures/vapor/package.jsonis excluded by!**/package.json
📒 Files selected for processing (70)
docs/3.guide/1.concepts/10.vuejs-development.mdpackages/nuxt/src/app/components/client-fallback.server.tspackages/nuxt/src/app/components/client-only.tspackages/nuxt/src/app/components/nuxt-layout.tspackages/nuxt/src/app/components/nuxt-teleport-island-component.tspackages/nuxt/src/app/components/utils.tspackages/nuxt/src/app/composables/asyncContext.tspackages/nuxt/src/app/composables/asyncData.tspackages/nuxt/src/app/composables/payload.tspackages/nuxt/src/app/composables/router.tspackages/nuxt/src/app/composables/ssr.tspackages/nuxt/src/app/diagnostics/core.tspackages/nuxt/src/app/diagnostics/head.tspackages/nuxt/src/app/diagnostics/render.tspackages/nuxt/src/app/nuxt.tspackages/nuxt/src/app/plugins/vapor-interop.client.tspackages/nuxt/src/components/plugins/loader.tspackages/nuxt/src/core/nuxt.tspackages/nuxt/src/head/runtime/components.tspackages/nuxt/src/pages/runtime/composables.tspackages/nuxt/test/auto-imports.test.tspackages/nuxt/test/component-loader.test.tspackages/schema/src/config/app.tspackages/schema/src/types/schema.tspackages/webpack/src/presets/base.tspnpm-workspace.yamltest/bundle.test.tstest/e2e/vapor.test.tstest/fixtures/vapor/app/app.vuetest/fixtures/vapor/app/components/ServerBox.server.vuetest/fixtures/vapor/app/components/VaporBuiltinSlots.vuetest/fixtures/vapor/app/components/VaporComposables.vuetest/fixtures/vapor/app/components/VaporCounter.vuetest/fixtures/vapor/app/components/VaporCustomLink.vuetest/fixtures/vapor/app/components/VaporNested.vuetest/fixtures/vapor/app/components/VaporPlainLink.vuetest/fixtures/vapor/app/components/VaporThrowsHandler.vuetest/fixtures/vapor/app/components/VaporThrowsSetup.vuetest/fixtures/vapor/app/components/VaporWrapper.vuetest/fixtures/vapor/app/components/VdomChild.vuetest/fixtures/vapor/app/pages/async-await.vuetest/fixtures/vapor/app/pages/async-data.vuetest/fixtures/vapor/app/pages/client-only.vuetest/fixtures/vapor/app/pages/composables.vuetest/fixtures/vapor/app/pages/dev-only.vuetest/fixtures/vapor/app/pages/error-boundary.vuetest/fixtures/vapor/app/pages/index.vuetest/fixtures/vapor/app/pages/inner-transition.vuetest/fixtures/vapor/app/pages/island.vuetest/fixtures/vapor/app/pages/keepalive-vapor.vuetest/fixtures/vapor/app/pages/keepalive-vdom.vuetest/fixtures/vapor/app/pages/lazy-data.vuetest/fixtures/vapor/app/pages/lazy-import.vuetest/fixtures/vapor/app/pages/lazy.vuetest/fixtures/vapor/app/pages/links-custom.vuetest/fixtures/vapor/app/pages/links.vuetest/fixtures/vapor/app/pages/mixed.vuetest/fixtures/vapor/app/pages/nested.vuetest/fixtures/vapor/app/pages/prefetch.vuetest/fixtures/vapor/app/pages/slow.vuetest/fixtures/vapor/app/pages/vapor-page-two.vuetest/fixtures/vapor/app/pages/vapor-page.vuetest/fixtures/vapor/app/pages/vapor-slots.vuetest/fixtures/vapor/app/pages/vdom-async-data.vuetest/fixtures/vapor/app/pages/vdom-page.vuetest/fixtures/vapor/app/types.d.tstest/fixtures/vapor/nuxt.config.tstest/fixtures/vapor/server/api/greeting.get.tstest/fixtures/vapor/server/api/hello.tstest/fixtures/vapor/tsconfig.json
💤 Files with no reviewable changes (1)
- packages/nuxt/src/app/composables/asyncContext.ts
| - vue | ||
| - '@vue/*' |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Keep the release-age exemption scoped to the required Vue RC packages.
Excluding the entire @vue/* namespace allows any newly published Vue package to bypass minimumReleaseAge, weakening the supply-chain protection. Prefer exact package/version exclusions for the RC packages required by this change.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pnpm-workspace.yaml` around lines 53 - 54, Replace the broad `@vue/`*
release-age exemption in the workspace configuration with exact package/version
exclusions for only the required Vue RC packages. Keep the existing vue
exemption if needed, and ensure newly published Vue packages remain subject to
minimumReleaseAge.
|
Is there a plan for Nuxt to eventually support a fully Vapor-based application, eliminating the Virtual DOM entirely? The current Vapor Mode support is great for incremental adoption through interop mode, but I’m wondering whether the long-term goal is to allow the Nuxt app root and Nuxt internals themselves to run entirely on Vapor, without relying on VDOM/VNodes. Is this something on the Nuxt roadmap, or is the interop approach intended to remain the long-term architecture? thanks you! |
|
@EduardoMateos i have spent some time on it and have a wip of a pure vapor nuxt app locally. it is something we'd be interested in but pure vapor currently does not support a number of key features you'd want, for example suspense outside interop, so it is extremely limited. i suspect vapor needs to mature further before a pure vapor nuxt app will be beneficial. |
🔗 Linked issue
resolves #32859
📚 Description
Note
it is already possible to use vue vapor with nuxt (see demo)
this is a PR to track full support for vue vapor (preview in Vue v3.6.0-rc.3).
it adds tests for vapor so we can track what is supported
Important
if you want to play around with this, note that you will need to make sure you install
"vue": "^3.6.0-rc.3"in yourpackage.jsonas well as enablevue.vaporin yournuxt.config. and note that this branch targets nitro v3 and nuxt v5 (but will be backported to nuxt v4). so play around with it in a fresh project rather than installing it in an existing one.Vue-side (upstream)
setCurrentInstancevuejs/core#15141🚧 TODO
vaporInteropPluginisundefinedserver-side; nuxt works around with a client-only plugin, see the TODO inpackages/nuxt/src/app/plugins/vapor-interop.client.ts)Nuxt-side
_createAssetComponent(vapor codegen) to direct importsvue.vaporoption installingvaporInteropPluginuseAsyncData(onServerPrefetchregistration,onBeforeMountfallback,NUXT_E3003false positive)definePageMetaruntime warning false positive in vapor componentsuseRoutetest regression under vue 3.6 (alien-signals; not vapor-specific)getCurrentInstance()usage for vapor (most sites already safe; the dev-diagnostic sites now share anisInComponentSetupscope discriminator)isVaporSlot()helper branches before calling the slot; warns where a vapor slot can'texpress the VNode content a built-in needs)
onPrehydratenow warns instead of silently degrading without a vdom instancevue.vapor+ known limitations