fix: do not drop SFC runtime behavior code in global builds

fix #873
This commit is contained in:
Evan You
2020-03-23 15:10:35 -04:00
parent 4126a9dd51
commit 4c1a193617
3 changed files with 18 additions and 29 deletions

View File

@@ -563,16 +563,14 @@ function baseCreateRenderer(
}
// scopeId
if (__BUNDLER__) {
if (scopeId) {
hostSetScopeId(el, scopeId)
}
const treeOwnerId = parentComponent && parentComponent.type.__scopeId
// vnode's own scopeId and the current patched component's scopeId is
// different - this is a slot content node.
if (treeOwnerId && treeOwnerId !== scopeId) {
hostSetScopeId(el, treeOwnerId + '-s')
}
if (scopeId) {
hostSetScopeId(el, scopeId)
}
const treeOwnerId = parentComponent && parentComponent.type.__scopeId
// vnode's own scopeId and the current patched component's scopeId is
// different - this is a slot content node.
if (treeOwnerId && treeOwnerId !== scopeId) {
hostSetScopeId(el, treeOwnerId + '-s')
}
// children