fix(ssr): fix ssr scopeId on component root
This commit is contained in:
@@ -204,12 +204,15 @@ export function generate(
|
||||
}
|
||||
|
||||
// enter render function
|
||||
if (genScopeId && !ssr) {
|
||||
push(`const render = ${PURE_ANNOTATION}_withId(`)
|
||||
}
|
||||
if (!ssr) {
|
||||
if (genScopeId) {
|
||||
push(`const render = ${PURE_ANNOTATION}_withId(`)
|
||||
}
|
||||
push(`function render(_ctx, _cache) {`)
|
||||
} else {
|
||||
if (genScopeId) {
|
||||
push(`const ssrRender = ${PURE_ANNOTATION}_withId(`)
|
||||
}
|
||||
push(`function ssrRender(_ctx, _push, _parent, _attrs) {`)
|
||||
}
|
||||
indent()
|
||||
@@ -272,7 +275,7 @@ export function generate(
|
||||
deindent()
|
||||
push(`}`)
|
||||
|
||||
if (genScopeId && !ssr) {
|
||||
if (genScopeId) {
|
||||
push(`)`)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user