wip: make legacy global apis available on app instance as well

This commit is contained in:
Evan You
2021-05-06 17:15:11 -04:00
parent fa48722441
commit b10db86711
4 changed files with 120 additions and 73 deletions

View File

@@ -15,9 +15,7 @@ import { RootHydrateFunction } from './hydration'
import { devtoolsInitApp, devtoolsUnmountApp } from './devtools'
import { isFunction, NO, isObject } from '@vue/shared'
import { version } from '.'
import { applySingletonAppMutations, installCompatMount } from './compat/global'
import { installLegacyConfigProperties } from './compat/globalConfig'
import { installGlobalFilterMethod } from './compat/filter'
import { installAppCompatProperties } from './compat/global'
export interface App<HostElement = any> {
version: string
@@ -328,10 +326,7 @@ export function createAppAPI<HostElement>(
})
if (__COMPAT__) {
installCompatMount(app, context, render, hydrate)
installGlobalFilterMethod(app, context)
if (__DEV__) installLegacyConfigProperties(app.config)
applySingletonAppMutations(app)
installAppCompatProperties(app, context, render)
}
return app