From bed85308676605292f280efc8b687a9d2fd92b09 Mon Sep 17 00:00:00 2001 From: "Mr.Hope" Date: Sun, 7 Apr 2024 13:49:57 +0800 Subject: [PATCH] feat: provide mismatch details under debug mode --- packages/bundler-vite/src/plugins/vuepressMainPlugin.ts | 2 +- packages/bundler-webpack/src/config/handlePluginDefine.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bundler-vite/src/plugins/vuepressMainPlugin.ts b/packages/bundler-vite/src/plugins/vuepressMainPlugin.ts index cf24c513f1..679255f64d 100644 --- a/packages/bundler-vite/src/plugins/vuepressMainPlugin.ts +++ b/packages/bundler-vite/src/plugins/vuepressMainPlugin.ts @@ -209,7 +209,7 @@ const resolveDefine = async ({ // enable options API by default __VUE_OPTIONS_API__: JSON.stringify(true), __VUE_PROD_DEVTOOLS__: JSON.stringify(app.env.isDebug), - __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: JSON.stringify(false), + __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: JSON.stringify(app.env.isDebug), } // override vite built-in define config in debug mode diff --git a/packages/bundler-webpack/src/config/handlePluginDefine.ts b/packages/bundler-webpack/src/config/handlePluginDefine.ts index ed99889eea..3a603cb458 100644 --- a/packages/bundler-webpack/src/config/handlePluginDefine.ts +++ b/packages/bundler-webpack/src/config/handlePluginDefine.ts @@ -27,7 +27,7 @@ export const handlePluginDefine = async ({ // enable options API by default __VUE_OPTIONS_API__: JSON.stringify(true), __VUE_PROD_DEVTOOLS__: JSON.stringify(app.env.isDebug), - __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: JSON.stringify(false), + __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: JSON.stringify(app.env.isDebug), }, ])