Skip to content

Commit

Permalink
build: make watch tree-shakable in lean build
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Feb 17, 2020
1 parent 77103e1 commit 0c1fe72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/runtime-core/src/componentProxy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ComponentInternalInstance, Data, Emit } from './component'
import { nextTick, queueJob } from './scheduler'
import { instanceWatch } from './apiWatch'
import { EMPTY_OBJ, hasOwn, isGloballyWhitelisted } from '@vue/shared'
import { EMPTY_OBJ, hasOwn, isGloballyWhitelisted, NOOP } from '@vue/shared'
import {
ExtractComputedReturns,
ComponentOptionsBase,
Expand Down Expand Up @@ -63,7 +63,7 @@ const publicPropertiesMap: Record<
$options: i => i.type,
$forceUpdate: i => () => queueJob(i.update),
$nextTick: () => nextTick,
$watch: i => instanceWatch.bind(i)
$watch: __FEATURE_OPTIONS__ ? i => instanceWatch.bind(i) : NOOP
}

const enum AccessTypes {
Expand Down

0 comments on commit 0c1fe72

Please sign in to comment.