1 | import Vue from './instance/index'
|
2 | import { initGlobalAPI } from './global-api/index'
|
3 | import { isServerRendering } from 'core/util/env'
|
4 | import { FunctionalRenderContext } from 'core/vdom/create-functional-component'
|
5 |
|
6 | initGlobalAPI(Vue)
|
7 |
|
8 | Object.defineProperty(Vue.prototype, '$isServer', {
|
9 | get: isServerRendering
|
10 | })
|
11 |
|
12 | Object.defineProperty(Vue.prototype, '$ssrContext', {
|
13 | get () {
|
14 |
|
15 | return this.$vnode && this.$vnode.ssrContext
|
16 | }
|
17 | })
|
18 |
|
19 |
|
20 | Object.defineProperty(Vue, 'FunctionalRenderContext', {
|
21 | value: FunctionalRenderContext
|
22 | })
|
23 |
|
24 | Vue.version = '__VERSION__'
|
25 |
|
26 | export default Vue
|