const root1 = nodeOps.createElement('div')
createApp(Comp).mount(root1)
expect(serializeInner(root1)).toBe(`0`)
+ //#5571 mount multiple apps to the same host element
+ createApp(Comp).mount(root1)
+ expect(
+ `There is already an app instance mounted on the host container`
+ ).toHaveBeenWarned()
// mount with props
const root2 = nodeOps.createElement('div')
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