diff --git a/packages/runtime-core/src/apiWatch.ts b/packages/runtime-core/src/apiWatch.ts index 322e38e6cf8..4fcc0a850b5 100644 --- a/packages/runtime-core/src/apiWatch.ts +++ b/packages/runtime-core/src/apiWatch.ts @@ -187,12 +187,13 @@ function doWatch( } } else { getter = NOOP - warn( - `Invalid watch source: `, - source, - `A watch source can only be a getter/effect function, a ref, ` + - `a reactive object, or an array of these types.` - ) + __DEV__ && + warn( + `Invalid watch source: `, + source, + `A watch source can only be a getter/effect function, a ref, ` + + `a reactive object, or an array of these types.` + ) } if (cb && deep) {