Skip to content

Commit 056cac9

Browse files
committed
feat(runtime-core): expose version on app instance
close #1449
1 parent bf84ac8 commit 056cac9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/runtime-core/src/apiCreateApp.ts

+4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ import { isFunction, NO, isObject } from '@vue/shared'
1313
import { warn } from './warning'
1414
import { createVNode, cloneVNode, VNode } from './vnode'
1515
import { RootHydrateFunction } from './hydration'
16+
import { version } from '.'
1617

1718
export interface App<HostElement = any> {
19+
version: string
1820
config: AppConfig
1921
use(plugin: Plugin, ...options: any[]): this
2022
mixin(mixin: ComponentOptions): this
@@ -126,6 +128,8 @@ export function createAppAPI<HostElement>(
126128
_container: null,
127129
_context: context,
128130

131+
version,
132+
129133
get config() {
130134
return context.config
131135
},

0 commit comments

Comments
 (0)