|
@@ -317,6 +317,35 @@ describe('ssr: components', () => {
|
|
|
`)
|
|
`)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ // #13724
|
|
|
|
|
+ test('slot content with v-memo', () => {
|
|
|
|
|
+ const { code } = compile(`<foo><bar v-memo="[]" /></foo>`)
|
|
|
|
|
+ expect(code).not.toMatch(`_cache`)
|
|
|
|
|
+ expect(compile(`<foo><bar v-memo="[]" /></foo>`).code)
|
|
|
|
|
+ .toMatchInlineSnapshot(`
|
|
|
|
|
+ "const { resolveComponent: _resolveComponent, withCtx: _withCtx, createVNode: _createVNode } = require("vue")
|
|
|
|
|
+ const { ssrRenderComponent: _ssrRenderComponent } = require("vue/server-renderer")
|
|
|
|
|
+
|
|
|
|
|
+ return function ssrRender(_ctx, _push, _parent, _attrs) {
|
|
|
|
|
+ const _component_foo = _resolveComponent("foo")
|
|
|
|
|
+ const _component_bar = _resolveComponent("bar")
|
|
|
|
|
+
|
|
|
|
|
+ _push(_ssrRenderComponent(_component_foo, _attrs, {
|
|
|
|
|
+ default: _withCtx((_, _push, _parent, _scopeId) => {
|
|
|
|
|
+ if (_push) {
|
|
|
|
|
+ _push(_ssrRenderComponent(_component_bar, null, null, _parent, _scopeId))
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return [
|
|
|
|
|
+ _createVNode(_component_bar)
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ }),
|
|
|
|
|
+ _: 1 /* STABLE */
|
|
|
|
|
+ }, _parent))
|
|
|
|
|
+ }"
|
|
|
|
|
+ `)
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
describe('built-in fallthroughs', () => {
|
|
describe('built-in fallthroughs', () => {
|
|
|
test('transition', () => {
|
|
test('transition', () => {
|
|
|
expect(compile(`<transition><div/></transition>`).code)
|
|
expect(compile(`<transition><div/></transition>`).code)
|