Backtestsvuerun-20261005-124535#15070
SSR memory leak after a render error in a dynamic component
Our patch was judged better than the merged fix.
In this judgment, Patch A = our agent, Patch B = the merged fix.
Both patches fix the core leak the same way: `renderSlot` now restores the block stack in a try/catch and resets `_d` in a `finally`. A failing slot inside `<component :is>` therefore no longer leaves a stale `currentBlock` that collects every later vnode, which is what retains the later apps. The difference is in the other paths each patch covers. Patch B adds a cleanup to the `finally` of `withCtx`. This handles inline blocks (such as `v-if`) inside any compiled slot function, including slots called directly by SSR helpers. It is a fairly general hook. Patch A covers more of the codebase: - The custom-element fallback branch of `renderSlot`. - `normalizeChildren` slot invocation, which is the dynamic-element case its second SSR test exercises. - A real latent bug in `renderComponentRoot`: the catch block set `blockStack.length = 0` but never reset `currentBlock`, so it kept pointing at a dead block. Patch B leaves this untouched. - The dev warning-context stack, now popped in `finally` in both `setupComponent` and `renderComponentSubTree`, so a failed render no longer leaves stale vnode/app references on that stack. Patch A also adds a small `resetBlockDepth` helper instead of repeating the inline loop. Tests: both add GC-based SSR regression tests covering the issue scenario and a `v-if` variant. Patch A also adds targeted unit tests: - `blockStack` and `currentBlock` invariants after slot, fallback and custom-element-fallback throws. - Nested blocks. - `_d` restoration. - The `renderComponentRoot` reset. These fail before the fix and are precise. Patch A's GC test also deliberately avoids `expect().rejects` retaining the rejected render. Patch B's `withCtx` hook does cover one case Patch A misses: an inline block thrown inside a compiled slot invoked directly by `ssrRenderSlot`. On balance, Patch A fixes more of the unclosed-block leak paths, including the clear `currentBlock` bug, and has stronger tests, so A is the better fix.
The judge saw only the two patches, labelled A and B in random order, with issue links and version numbers removed. The reasoning above is shown verbatim.
Solve
26m 6s
Wall-clock time in the container
Full test suite
No new failures
3,617 passed · 6 skipped · 3,623 total
Contamination audit
Clean
No sign the agent saw the real fix
Patch size
349vs 152 merged
Changed lines, ours vs merged
The issue
View on GitHubVue version
3.5.39
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-qfkzyzwp?file=leak.mjs
Steps to reproduce
- download the reproduction from stackblitz (won't work there, needs to be run locally)
- run
pnpm i && pnpm leak - see the heap size & alive app instances grow with each request after the single failed render
The script renders 500 fresh SSR apps, which all get garbage-collected. Then renders one app whose slot content throws, then renders 500 more identical healthy apps, which will never be garbage collected afterwards.
A dynamic component <component :is> with a <slot /> is needed for this to reproduce.
Card
<script setup>
defineProps({ tag: { type: String, default: 'div' } })
</script>
<template>
<component :is="tag" class="card">
<slot />
</component>
</template>
app:
<script setup>
defineProps(['payload']) // one request renders with `payload: null` → throws
</script>
<template>
<main>
<Card>{{ payload.title }}</Card>
</main>
</template>
What is expected?
A failed renderToString should not affect subsequent renders and all apps rendered after it should get garbage collected.
What is actually happening?
Every app created after the single failed render is kept in memory forever.
--- phase 1: 500 healthy renders ---
after 500: created=500 finalized=500 alive=0 heap=20.6MB
--- one crashing render (SSR render error) ---
render rejected as expected: Cannot read properties of null (reading 'title')
--- phase 2: 500 healthy renders (identical to phase 1) ---
after 500: created=1001 finalized=500 alive=501 heap=29.0MB
FINAL: created=1001 finalized=500 alive=501
System Info
Any additional comments?
_No response_
The two patches
packages/runtime-core/__tests__/errorHandling.spec.tsindex 0cd3efa58..986d0dae9 100644@@ -14,6 +14,7 @@ import { watchEffect, } from '@vue/runtime-test' import { ErrorCodes, ErrorTypeStrings } from '../src/errorHandling'+import { blockStack, createBlock, currentBlock, openBlock } from '../src/vnode' describe('error handling', () => { test('propagation', () => {@@ -246,6 +247,41 @@ describe('error handling', () => { expect(fn).toHaveBeenCalledWith(err, 'render function') }) + test('in render function should reset block tracking state', () => {+ const err = new Error('foo')+ const fn = vi.fn()++ const Comp = {+ setup() {+ onErrorCaptured((err, instance, info) => {+ fn(err, info)+ return false+ })+ return () => h(Child)+ },+ }++ const Child = {+ setup() {+ return () => (+ openBlock(),+ createBlock('div', null, [+ (() => {+ throw err+ })(),+ ])+ )+ },+ }++ render(h(Comp), nodeOps.createElement('div'))+ expect(fn).toHaveBeenCalledWith(err, 'render function')+ // the block opened by the failed render must not stay current, otherwise+ // vnodes created afterwards would be collected into (and retained by) it+ expect(blockStack.length).toBe(0)+ expect(currentBlock).toBe(null)+ })+ test('in function ref', () => { const err = new Error('foo') const ref = () => {packages/runtime-core/__tests__/helpers/renderSlot.spec.tsindex bc0678b51..558f7985f 100644@@ -11,6 +11,7 @@ import { } from '../../src' import { PatchFlags } from '@vue/shared' import { setCurrentRenderingInstance } from '../../src/componentRenderContext'+import { blockStack, currentBlock } from '../../src/vnode' describe('renderSlot', () => { beforeEach(() => {@@ -95,4 +96,80 @@ describe('renderSlot', () => { expect(vnode.patchFlag).toBe(PatchFlags.BAIL) }) })+ describe('error in slot', () => {+ const renderThrowing = (fn: () => void) => {+ expect(fn).toThrow('slot error')+ }++ it('should close the slot block when the slot throws', () => {+ const slot = withCtx(+ () => {+ throw new Error('slot error')+ },+ { type: {} } as any,+ ) as Slot+ renderThrowing(() => renderSlot({ default: slot }, 'default'))+ expect(blockStack.length).toBe(0)+ expect(currentBlock).toBe(null)+ // compiled slot block tracking flag should be restored+ expect((slot as any)._d).toBe(true)+ })++ it('should close nested blocks opened by the throwing slot', () => {+ openBlock()+ const outerBlock = currentBlock+ renderThrowing(() =>+ renderSlot(+ {+ default: () => {+ openBlock()+ throw new Error('slot error')+ },+ },+ 'default',+ ),+ )+ // only the block opened outside of renderSlot should remain+ expect(blockStack.length).toBe(1)+ expect(currentBlock).toBe(outerBlock)+ // vnodes created afterwards are tracked by the outer block+ const dynamic = createVNode('div', null, 'foo', PatchFlags.TEXT)+ const parent = createBlock('div')+ expect(parent.dynamicChildren).toEqual([dynamic])+ expect(blockStack.length).toBe(0)+ expect(currentBlock).toBe(null)+ })++ it('should close the slot block when the fallback throws', () => {+ renderThrowing(() =>+ renderSlot({}, 'default', {}, () => {+ throw new Error('slot error')+ }),+ )+ expect(blockStack.length).toBe(0)+ expect(currentBlock).toBe(null)+ })++ it('should close the slot block when the custom element fallback throws', () => {+ setCurrentRenderingInstance({ type: {}, ce: {} } as any)+ renderThrowing(() =>+ renderSlot({}, 'default', {}, () => {+ throw new Error('slot error')+ }),+ )+ expect(blockStack.length).toBe(0)+ expect(currentBlock).toBe(null)+ })++ it('should restore compiled slot flag when normalizing element children throws', () => {+ const slot = withCtx(+ () => {+ throw new Error('slot error')+ },+ { type: {} } as any,+ )+ renderThrowing(() => createVNode('div', null, { default: slot }))+ expect((slot as any)._d).toBe(true)+ })+ }) })packages/runtime-core/src/componentRenderUtils.tsindex 0b46130c0..a87be3f8f 100644@@ -10,6 +10,7 @@ import { type VNodeArrayChildren, blockStack, cloneVNode,+ closeBlock, createVNode, isVNode, normalizeVNode,@@ -142,6 +143,9 @@ export function renderComponentRoot( } } catch (err) { blockStack.length = 0+ // also reset the current block, otherwise it would keep referencing (and+ // collecting vnodes into) a block that was never closed+ closeBlock() handleError(err, instance, ErrorCodes.RENDER_FUNCTION) result = createVNode(Comment) }packages/runtime-core/src/helpers/renderSlot.tsindex 2f1296bb1..034244aea 100644@@ -9,10 +9,12 @@ import { Fragment, type VNode, type VNodeArrayChildren,+ blockStack, createBlock, createVNode, isVNode, openBlock,+ resetBlockDepth, } from '../vnode' import { PatchFlags, SlotFlags, isSymbol } from '@vue/shared' import { warn } from '../warning'@@ -42,15 +44,21 @@ export function renderSlot( // wrap it with a fragment because in shadowRoot: false mode the slot // element gets replaced by injected content if (name !== 'default') props.name = name- return (- openBlock(),- createBlock(- Fragment,- null,- [createVNode('slot', props, fallback && fallback())],- hasProps ? PatchFlags.BAIL : PatchFlags.STABLE_FRAGMENT,+ const prevBlockDepth = blockStack.length+ try {+ return (+ openBlock(),+ createBlock(+ Fragment,+ null,+ [createVNode('slot', props, fallback && fallback())],+ hasProps ? PatchFlags.BAIL : PatchFlags.STABLE_FRAGMENT,+ ) )- )+ } catch (err) {+ resetBlockDepth(prevBlockDepth)+ throw err+ } } let slot = slots[name]@@ -71,32 +79,44 @@ export function renderSlot( if (slot && (slot as ContextualRenderFn)._c) { ;(slot as ContextualRenderFn)._d = false }+ const prevBlockDepth = blockStack.length openBlock()- const validSlotContent = slot && ensureValidVNode(slot(props))- const slotKey =- props.key ||- // slot content array of a dynamic conditional slot may have a branch- // key attached in the `createSlots` helper, respect that- (validSlotContent && (validSlotContent as any).key)- const rendered = createBlock(- Fragment,- {- key:- (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) +- // #7256 force differentiate fallback content from actual content- (!validSlotContent && fallback ? '_fb' : ''),- },- validSlotContent || (fallback ? fallback() : []),- validSlotContent && (slots as RawSlots)._ === SlotFlags.STABLE- ? PatchFlags.STABLE_FRAGMENT- : PatchFlags.BAIL,- )+ let rendered: VNode+ try {+ const validSlotContent = slot && ensureValidVNode(slot(props))+ const slotKey =+ props.key ||+ // slot content array of a dynamic conditional slot may have a branch+ // key attached in the `createSlots` helper, respect that+ (validSlotContent && (validSlotContent as any).key)+ rendered = createBlock(+ Fragment,+ {+ key:+ (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) ++ // #7256 force differentiate fallback content from actual content+ (!validSlotContent && fallback ? '_fb' : ''),+ },+ validSlotContent || (fallback ? fallback() : []),+ validSlotContent && (slots as RawSlots)._ === SlotFlags.STABLE+ ? PatchFlags.STABLE_FRAGMENT+ : PatchFlags.BAIL,+ )+ } catch (err) {+ // the slot (or its fallback) threw before the block was closed. Close any+ // blocks left open so the stale block doesn't keep collecting (and+ // retaining) vnodes created afterwards - which in SSR would never be+ // released since no later render resets the block stack.+ resetBlockDepth(prevBlockDepth)+ throw err+ } finally {+ if (slot && (slot as ContextualRenderFn)._c) {+ ;(slot as ContextualRenderFn)._d = true+ }+ } if (!noSlotted && rendered.scopeId) { rendered.slotScopeIds = [rendered.scopeId + '-s'] }- if (slot && (slot as ContextualRenderFn)._c) {- ;(slot as ContextualRenderFn)._d = true- } return rendered } packages/runtime-core/src/vnode.tsindex b4fe6f237..99fb88dd4 100644@@ -290,6 +290,19 @@ export function closeBlock(): void { currentBlock = blockStack[blockStack.length - 1] || null } +/**+ * Close any blocks opened beyond the given depth, e.g. when rendering code+ * threw before closing them. Otherwise the stale block would keep collecting+ * (and retaining) vnodes created afterwards - which in SSR would never be+ * released since no later render resets the block stack.+ * @internal+ */+export function resetBlockDepth(depth: number): void {+ while (blockStack.length > depth) {+ closeBlock()+ }+}+ // Whether we should be tracking dynamic child nodes inside a block. // Only tracks when this value is > 0 // We are not using a simple boolean because this value may need to be@@ -829,8 +842,15 @@ export function normalizeChildren(vnode: VNode, children: unknown): void { if (slot) { // _c marker is added by withCtx() indicating this is a compiled slot slot._c && (slot._d = false)- normalizeChildren(vnode, slot())- slot._c && (slot._d = true)+ const prevBlockDepth = blockStack.length+ try {+ normalizeChildren(vnode, slot())+ } catch (err) {+ resetBlockDepth(prevBlockDepth)+ throw err+ } finally {+ slot._c && (slot._d = true)+ } } return } else {packages/server-renderer/__tests__/ssrMemoryLeak.spec.tsnew file mode 100644index 000000000..aca866aee@@ -0,0 +1,100 @@+import { createSSRApp } from 'vue'+import { renderToString } from '../src'++const gc = () =>+ new Promise<void>(resolve => {+ setTimeout(() => {+ global.gc!()+ resolve()+ })+ })++describe.skipIf(!global.gc)('ssr: memory leak', () => {+ // #15070+ test('apps rendered after a slot render error should be released', async () => {+ const Card = {+ props: { tag: { type: String, default: 'div' } },+ template: `<component :is="tag" class="card"><slot /></component>`,+ }+ const App = {+ components: { Card },+ props: ['payload'],+ template: `<main><Card>{{ payload.title }}</Card></main>`,+ }++ const weakRefs: any[] = []+ const renderOnce = (payload: any) => {+ const app = createSSRApp(App, { payload })+ // @ts-expect-error ES2021 API+ weakRefs.push(new WeakRef(app))+ return renderToString(app)+ }++ expect(await renderOnce({ title: 'ok' })).toBe(+ `<main><div class="card"><!--[-->ok<!--]--></div></main>`,+ )++ // not using `expect().rejects` here since it retains the rejected render+ let error: unknown+ try {+ await renderOnce(null)+ } catch (e) {+ error = e+ }+ expect(error).toBeInstanceOf(TypeError)+ error = undefined++ for (let i = 0; i < 10; i++) {+ expect(await renderOnce({ title: 'ok' })).toBe(+ `<main><div class="card"><!--[-->ok<!--]--></div></main>`,+ )+ }++ for (let i = 0; i < 5; i++) {+ await gc()+ }++ expect(weakRefs.filter(ref => ref.deref()).length).toBe(0)+ })++ test('apps rendered after a block render error in dynamic element children should be released', async () => {+ const App = {+ props: ['payload'],+ template: `<main><component :is="'div'"><span v-if="payload !== undefined">{{ payload.title }}</span></component></main>`,+ }++ const weakRefs: any[] = []+ const renderOnce = (payload: any) => {+ const app = createSSRApp(App, { payload })+ // @ts-expect-error ES2021 API+ weakRefs.push(new WeakRef(app))+ return renderToString(app)+ }++ expect(await renderOnce({ title: 'ok' })).toBe(+ `<main><div><span>ok</span></div></main>`,+ )++ // not using `expect().rejects` here since it retains the rejected render+ let error: unknown+ try {+ await renderOnce(null)+ } catch (e) {+ error = e+ }+ expect(error).toBeInstanceOf(TypeError)+ error = undefined++ for (let i = 0; i < 10; i++) {+ expect(await renderOnce({ title: 'ok' })).toBe(+ `<main><div><span>ok</span></div></main>`,+ )+ }++ for (let i = 0; i < 5; i++) {+ await gc()+ }++ expect(weakRefs.filter(ref => ref.deref()).length).toBe(0)+ })+})packages/server-renderer/src/render.tsindex 8fc9b0128..600826639 100644@@ -100,8 +100,12 @@ export function renderComponentVNode( null, )) if (__DEV__) pushWarningContext(vnode)- const res = setupComponent(instance, true /* isSSR */)- if (__DEV__) popWarningContext()+ let res+ try {+ res = setupComponent(instance, true /* isSSR */)+ } finally {+ if (__DEV__) popWarningContext()+ } const hasAsyncSetup = isPromise(res) let prefetches = instance.sp /* LifecycleHooks.SERVER_PREFETCH */ if (hasAsyncSetup || prefetches) {@@ -128,6 +132,19 @@ function renderComponentSubTree( slotScopeId?: string, ): SSRBuffer | Promise<SSRBuffer> { if (__DEV__) pushWarningContext(instance.vnode)+ try {+ return renderComponentSubTreeImpl(instance, slotScopeId)+ } finally {+ // must be popped even if rendering throws, otherwise the stale vnode (and+ // its whole app) would be retained by the warning context stack+ if (__DEV__) popWarningContext()+ }+}++function renderComponentSubTreeImpl(+ instance: ComponentInternalInstance,+ slotScopeId?: string,+): SSRBuffer | Promise<SSRBuffer> { const comp = instance.type as Component const { getBuffer, push } = createBuffer() if (isFunction(comp)) {@@ -217,7 +234,6 @@ function renderComponentSubTree( push(`<!---->`) } }- if (__DEV__) popWarningContext() return getBuffer() } vitest.config.tsindex 2fbc92f92..ec72f0287 100644@@ -58,6 +58,7 @@ export default defineConfig({ '**/e2e/**', '**/{vue,vue-compat,runtime-dom}/**', 'packages/server-renderer/__tests__/ssrWatch.spec.ts',+ 'packages/server-renderer/__tests__/ssrMemoryLeak.spec.ts', ], }, },@@ -66,7 +67,10 @@ export default defineConfig({ test: { name: 'unit-gc', pool: 'forks',- include: ['packages/server-renderer/__tests__/ssrWatch.spec.ts'],+ include: [+ 'packages/server-renderer/__tests__/ssrWatch.spec.ts',+ 'packages/server-renderer/__tests__/ssrMemoryLeak.spec.ts',+ ], execArgv: ['--expose-gc'], }, },
packages/runtime-core/src/componentRenderContext.tsindex b1fc70c03..d10eba648 100644@@ -1,6 +1,6 @@ import type { ComponentInternalInstance } from './component' import { devtoolsComponentUpdated } from './devtools'-import { setBlockTracking } from './vnode'+import { blockStack, closeBlock, setBlockTracking } from './vnode' /** * mark the current rendering instance for asset resolution (e.g.@@ -89,10 +89,14 @@ export function withCtx( setBlockTracking(-1) } const prevInstance = setCurrentRenderingInstance(ctx)+ const prevStackSize = blockStack.length let res try { res = fn(...args) } finally {+ // close blocks left dangling when the slot throws mid-block+ // inline blocks (for example `v-if`) have no helper to unwind themselves (#15070)+ for (let i = blockStack.length; i > prevStackSize; i--) closeBlock() setCurrentRenderingInstance(prevInstance) if (renderFnWithContext._d) { setBlockTracking(1)packages/runtime-core/src/helpers/renderSlot.tsindex 2f1296bb1..8f65f8af4 100644@@ -9,6 +9,8 @@ import { Fragment, type VNode, type VNodeArrayChildren,+ blockStack,+ closeBlock, createBlock, createVNode, isVNode,@@ -71,32 +73,42 @@ export function renderSlot( if (slot && (slot as ContextualRenderFn)._c) { ;(slot as ContextualRenderFn)._d = false }+ const prevStackSize = blockStack.length openBlock()- const validSlotContent = slot && ensureValidVNode(slot(props))- const slotKey =- props.key ||- // slot content array of a dynamic conditional slot may have a branch- // key attached in the `createSlots` helper, respect that- (validSlotContent && (validSlotContent as any).key)- const rendered = createBlock(- Fragment,- {- key:- (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) +- // #7256 force differentiate fallback content from actual content- (!validSlotContent && fallback ? '_fb' : ''),- },- validSlotContent || (fallback ? fallback() : []),- validSlotContent && (slots as RawSlots)._ === SlotFlags.STABLE- ? PatchFlags.STABLE_FRAGMENT- : PatchFlags.BAIL,- )+ let rendered: VNode+ try {+ const validSlotContent = slot && ensureValidVNode(slot(props))+ const slotKey =+ props.key ||+ // slot content array of a dynamic conditional slot may have a branch+ // key attached in the `createSlots` helper, respect that+ (validSlotContent && (validSlotContent as any).key)+ rendered = createBlock(+ Fragment,+ {+ key:+ (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) ++ // #7256 force differentiate fallback content from actual content+ (!validSlotContent && fallback ? '_fb' : ''),+ },+ validSlotContent || (fallback ? fallback() : []),+ validSlotContent && (slots as RawSlots)._ === SlotFlags.STABLE+ ? PatchFlags.STABLE_FRAGMENT+ : PatchFlags.BAIL,+ )+ } catch (err) {+ // close blocks left dangling when the slot throws mid-block+ // they would otherwise retain every vnode created afterwards (#15070)+ for (let i = blockStack.length; i > prevStackSize; i--) closeBlock()+ throw err+ } finally {+ if (slot && (slot as ContextualRenderFn)._c) {+ ;(slot as ContextualRenderFn)._d = true+ }+ } if (!noSlotted && rendered.scopeId) { rendered.slotScopeIds = [rendered.scopeId + '-s'] }- if (slot && (slot as ContextualRenderFn)._c) {- ;(slot as ContextualRenderFn)._d = true- } return rendered } packages/server-renderer/__tests__/ssrRender.spec.tsnew file mode 100644index 000000000..2d23452a3@@ -0,0 +1,84 @@+import { createSSRApp } from 'vue'+import { renderToString } from '../src/renderToString'++const gc = () =>+ new Promise<void>(resolve => {+ setTimeout(() => {+ global.gc!()+ resolve()+ })+ })++const Card = {+ props: { tag: { type: String, default: 'div' } },+ template: `<component :is="tag" class="card"><slot /></component>`,+}++const Page = {+ components: { Card },+ props: ['payload'],+ template: `<main><Card>{{ payload.title }}</Card></main>`,+}++describe.skipIf(!global.gc)('ssr: render error leak', () => {+ // #15070+ test('should GC apps created after a render error in a forwarded slot', async () => {+ const createApp = (payload: any) => createSSRApp(Page, { payload })++ expect(await renderToString(createApp({ title: 'ok' }))).toContain('ok')++ await expect(renderToString(createApp(null))).rejects.toThrow(+ `Cannot read properties of null`,+ )++ const weakRefs: { deref(): unknown | undefined }[] = []+ const renderOnce = async () => {+ const app = createApp({ title: 'ok' })+ // @ts-expect-error ES2021 API+ weakRefs.push(new WeakRef(app))+ expect(await renderToString(app)).toContain('ok')+ }+ for (let i = 0; i < 20; i++) {+ await renderOnce()+ }++ for (let i = 0; i < 5; i++) {+ await gc()+ }++ expect(weakRefs.filter(ref => ref.deref()).length).toBe(0)+ })++ test('should GC apps created after a render error in an inline block (`v-if`)', async () => {+ const PageIf = {+ props: ['payload'],+ template: `<component :is="'div'"><div v-if="payload.list">{{ payload.list.missing.x }}</div></component>`,+ }+ const createApp = (payload: any) => createSSRApp(PageIf, { payload })++ expect(+ await renderToString(createApp({ list: { missing: { x: 'ok' } } })),+ ).toContain('ok')++ await expect(renderToString(createApp({ list: {} }))).rejects.toThrow(+ `Cannot read properties of undefined`,+ )++ const weakRefs: { deref(): unknown | undefined }[] = []+ const renderOnce = async () => {+ const app = createApp({ list: { missing: { x: 'ok' } } })+ // @ts-expect-error ES2021 API+ weakRefs.push(new WeakRef(app))+ expect(await renderToString(app)).toContain('ok')+ }+ for (let i = 0; i < 20; i++) {+ await renderOnce()+ }++ for (let i = 0; i < 5; i++) {+ await gc()+ }++ expect(weakRefs.filter(ref => ref.deref()).length).toBe(0)+ })+})vitest.config.tsindex 2fbc92f92..8e1f5bec8 100644@@ -58,6 +58,7 @@ export default defineConfig({ '**/e2e/**', '**/{vue,vue-compat,runtime-dom}/**', 'packages/server-renderer/__tests__/ssrWatch.spec.ts',+ 'packages/server-renderer/__tests__/ssrRender.spec.ts', ], }, },@@ -66,7 +67,10 @@ export default defineConfig({ test: { name: 'unit-gc', pool: 'forks',- include: ['packages/server-renderer/__tests__/ssrWatch.spec.ts'],+ include: [+ 'packages/server-renderer/__tests__/ssrWatch.spec.ts',+ 'packages/server-renderer/__tests__/ssrRender.spec.ts',+ ], execArgv: ['--expose-gc'], }, },