chore: warn when mounting different apps on the same host element (#5573)
This commit is contained in:
@@ -284,6 +284,14 @@ export function createAppAPI<HostElement>(
|
||||
isSVG?: boolean
|
||||
): any {
|
||||
if (!isMounted) {
|
||||
// #5571
|
||||
if (__DEV__ && (rootContainer as any).__vue_app__) {
|
||||
warn(
|
||||
`There is already an app instance mounted on the host container.\n` +
|
||||
` If you want to mount another app on the same host container,` +
|
||||
` you need to unmount the previous app by calling \`app.unmount()\` first.`
|
||||
)
|
||||
}
|
||||
const vnode = createVNode(
|
||||
rootComponent as ConcreteComponent,
|
||||
rootProps
|
||||
|
||||
Reference in New Issue
Block a user