]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(warning): ensure prod hydration warnings actually work
authorEvan You <yyx990803@gmail.com>
Tue, 26 Dec 2023 02:52:45 +0000 (10:52 +0800)
committerEvan You <yyx990803@gmail.com>
Tue, 26 Dec 2023 02:52:45 +0000 (10:52 +0800)
packages/runtime-core/src/warning.ts

index 8e93d9efe59da24f1306fc3fbce5ef88cdb8d60d..67e4ee31255fdb62c3f12d9ba546530309081135 100644 (file)
@@ -31,7 +31,7 @@ export function popWarningContext() {
 }
 
 export function warn(msg: string, ...args: any[]) {
-  if (!__DEV__) return
+  if (!__DEV__ && !__FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__) return
 
   // avoid props formatting or warn handler tracking deps that might be mutated
   // during patch, leading to infinite recursion.