mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-04 21:17:55 +08:00
use _isServer flag to determine whether __path__ should be noop
This commit is contained in:
parent
76d06ba422
commit
4dc42357e4
@ -1,11 +1,11 @@
|
||||
import Vue from 'core/index'
|
||||
import config from 'core/config'
|
||||
import { createPatchFunction } from 'core/vdom/patch'
|
||||
import * as nodeOps from 'web/runtime/node-ops'
|
||||
import platformDirectives from 'web/runtime/directives/index'
|
||||
import baseModules from 'core/vdom/modules/index'
|
||||
import platformModules from 'web/runtime/modules/index'
|
||||
import { query, isUnknownElement, isReservedTag } from 'web/util/index'
|
||||
import { inBrowser } from 'core/util/env'
|
||||
import { noop } from 'core/util/index'
|
||||
|
||||
// install platform specific utils
|
||||
@ -17,9 +17,9 @@ Vue.options.directives = platformDirectives
|
||||
|
||||
// install platform patch function
|
||||
const modules = baseModules.concat(platformModules)
|
||||
Vue.prototype.__patch__ = inBrowser
|
||||
? createPatchFunction({ nodeOps, modules })
|
||||
: noop
|
||||
Vue.prototype.__patch__ = config._isServer
|
||||
? noop
|
||||
: createPatchFunction({ nodeOps, modules })
|
||||
|
||||
// wrap mount
|
||||
Vue.prototype.$mount = function (el) {
|
||||
|
Loading…
Reference in New Issue
Block a user