SSR <component> does not resolve after first v-for iteration
Version
3.0.7
Reproduction link
https://runkit.com/exe-dealer/vue3-ssr-issue
Steps to reproduce
import { createSSRApp } from 'vue';
import { renderToString } from '@vue/server-renderer';
renderToString(createSSRApp({
template: `<component is="x" v-for="_ in [1, 2, 3]"></component>`,
components: {
x: { template: `<div>x</div>` },
}
}))
.then(console.log);
What is expected?
<div>x</div>
<div>x</div>
<div>x</div>
What is actually happening?
<div>x</div>
<x></x>
<x></x>
It also warns
[Vue warn]: resolveComponent can only be used in render() or setup().
[Vue warn]: resolveComponent can only be used in render() or setup().
I think this is a duplicate of https://github.com/vuejs/vue-next/issues/2863
Duplicate of https://github.com/vuejs/vue-next/issues/2863