Skip to content

feat: vapor mode - #5179

Open
edison1105 wants to merge 17 commits into
vuejs:mainfrom
edison1105:edison/feat/vaporMode
Open

feat: vapor mode#5179
edison1105 wants to merge 17 commits into
vuejs:mainfrom
edison1105:edison/feat/vaporMode

Conversation

@edison1105

@edison1105 edison1105 commented Apr 14, 2026

Copy link
Copy Markdown
Member

Description

support vapor mode for the default theme.

<section class="VPTeamPageSection">
<div class="title">
<div class="title-line" />
<h2 v-if="$slots.title" class="title-text">

@edison1105 edison1105 Apr 14, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vue compile doesn't inject $slot, $attrs for template-only component in Vapor mode. So it is necessary to define $slots.

Comment thread src/node/markdownToVue.ts
const isUsingTS = tags.findIndex((tag) => scriptLangTsRE.test(tag)) > -1
const defaultExportCode = `\nexport default {name:${JSON.stringify(
data.relativePath
)}${vapor ? `,__vapor:true` : ``}}`

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

process the markdown file into a Vapor component.

:algolia-options
:open-request
@vue:beforeMount="actuallyLoaded = true"
@beforeMount="actuallyLoaded = true"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vnode hooks don't work in Vapor mode

Comment thread src/client/app/index.ts
? createSSRApp(VitePressApp)
: createClientApp(VitePressApp)
if (import.meta.env.SSR) {
return createSSRApp(VitePressApp)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vapor mode only works in the browser, so it should always use createSSRApp in server render.

@brc-dd

brc-dd commented Apr 14, 2026

Copy link
Copy Markdown
Member

/publish

@pkg-pr-new

pkg-pr-new Bot commented Apr 14, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/vitepress@5179

commit: 884a0ef

@github-actions github-actions Bot added the stale label Jun 27, 2026
@brc-dd

brc-dd commented Aug 1, 2026

Copy link
Copy Markdown
Member

are there any more changes needed in the PR? if not we should just resolve conflict + bump to rc.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants