Skip to content

feat: Vue 3.6 Vapor mode support - #124

Open
Valian wants to merge 4 commits into
mainfrom
vue-vapor-mode
Open

feat: Vue 3.6 Vapor mode support#124
Valian wants to merge 4 commits into
mainfrom
vue-vapor-mode

Conversation

@Valian

@Valian Valian commented Mar 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove createApp/createSSRApp from SetupContext, moving them into defaultSetup in app.ts
  • The library no longer forces a specific Vue app factory — users who want Vapor mode can provide their own setup with vaporInteropPlugin
  • Fix ssr flag in SetupContext which was hardcoded to false — now truthfully reflects data-ssr attribute

Breaking change

SetupContext.createApp is removed. Users with a custom setup function that destructured createApp from context need to import it from vue directly.

Test plan

  • All 221 unit tests pass
  • E2E tests with standard (non-Vapor) setup
  • Manual test with Vue 3.6 beta + vaporInteropPlugin

🤖 Generated with Claude Code

Valian and others added 2 commits March 6, 2026 11:44
Move createApp/createSSRApp from hooks.ts into defaultSetup in app.ts,
removing createApp from SetupContext. Users who want Vapor mode can now
provide their own setup function with vaporInteropPlugin. Also fixes the
ssr flag which was previously hardcoded to false.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update vue_index_content setup to import createApp from vue directly
  instead of destructuring from SetupContext
- Pin all @vue/* packages to 3.6.0-beta.7 with overrides for peer dep
  resolution during beta period
- Bump @vitejs/plugin-vue to ^6.0.4 for Vue 3.6 compatibility
- Update SSR vite config to bundle Vue packages and use ESM conditions,
  fixing @vue/runtime-vapor SSR imports
- Add comment about enabling Vapor mode in generated setup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Valian

Valian commented Mar 6, 2026

Copy link
Copy Markdown
Owner Author

Blocked on Vue 3.6 stable release.

Most of the package.json and vite SSR config changes in the installer are temporary workarounds for the beta:

  • All the @vue/* package pins and overrides block exist only because npm won't match pre-release versions against ^3.x peer deps. Once 3.6 is stable, this simplifies to just "vue": "^3.6.0" and "@vue/runtime-vapor": "^3.6.0".
  • The @vitejs/plugin-vue bump to ^6.0.4 may also settle once the Vue 3.6 ecosystem stabilizes.
  • The expanded ssr.noExternal list and ssr.resolve.conditions in vite config may not be needed once Vue 3.6 ships proper CJS/ESM resolution.

Before merging, wait for Vue 3.6 stable, then clean up update_package_json_for_vue and add_ssr_vite_entry in the installer.

Valian and others added 2 commits March 6, 2026 12:24
Remove defaultSetup and all Vue app factory imports from library source
files. The user's setup function (always generated by the installer) now
fully controls which Vue factories are imported, enabling proper
tree-shaking for Vapor-only setups.

- Remove defaultSetup from app.ts, make setup required in LiveVueOptions
- Remove unused createSSRApp import from server.ts
- Fix installer's generated setup to use ssr flag with createSSRApp

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add runtime check for initializeApp before passing to createLiveVue,
satisfying the now-required setup parameter type.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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