4dd52066484da660ae6a18d173725d34a13f0aff191f11ba914ecf60b28274a351e8bca3e678c47d2710b5085fb17cdbcab93fee005c0520f073c7a216d7b1 682 B

1234567891011121314151617181920212223242526
  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. initGlobalAPI(Vue)
  6. Object.defineProperty(Vue.prototype, '$isServer', {
  7. get: isServerRendering
  8. })
  9. Object.defineProperty(Vue.prototype, '$ssrContext', {
  10. get () {
  11. /* istanbul ignore next */
  12. return this.$vnode && this.$vnode.ssrContext
  13. }
  14. })
  15. // expose FunctionalRenderContext for ssr runtime helper installation
  16. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  17. value: FunctionalRenderContext
  18. })
  19. Vue.version = '__VERSION__'
  20. export default Vue