MCPcopy
hub / github.com/vuejs/core / wrappedCreateApp

Function wrappedCreateApp

packages/vue-compat/src/createCompatVue.ts:23–39  ·  view source on GitHub ↗
(...args: any[])

Source from the content-addressed store, hash-verified

21import * as runtimeDom from '@vue/runtime-dom'
22
23function wrappedCreateApp(...args: any[]) {
24 // @ts-expect-error
25 const app = createApp(...args)
26 if (compatUtils.isCompatEnabled(DeprecationTypes.RENDER_FUNCTION, null)) {
27 // register built-in components so that they can be resolved via strings
28 // in the legacy h() call. The __compat__ prefix is to ensure that v3 h()
29 // doesn't get affected.
30 app.component('__compat__transition', Transition)
31 app.component('__compat__transition-group', TransitionGroup)
32 app.component('__compat__keep-alive', KeepAlive)
33 // built-in directives. No need for prefix since there's no render fn API
34 // for resolving directives via string in v3.
35 app._context.directives.show = vShow
36 app._context.directives.model = vModelDynamic
37 }
38 return app
39}
40
41export function createCompatVue(): CompatVue {
42 const Vue = compatUtils.createCompatVue(createApp, wrappedCreateApp)

Callers

nothing calls this directly

Calls 1

componentMethod · 0.80

Tested by

no test coverage detected