Skip to content

Commit

Permalink
fix(nuxt): add __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ (#24836)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Dec 20, 2023
1 parent a073bec commit f5a44fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/nuxt/test/auto-imports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ const excludedVueHelpers = [
'Transition',
'TransitionGroup',
'VueElement',
'ErrorTypeStrings',
'createApp',
'createSSRApp',
'defineCustomElement',
Expand Down
7 changes: 4 additions & 3 deletions packages/schema/src/config/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ export default defineUntypedSchema({
},
define: {
$resolve: async (val, get) => {
const dev = await get('dev')
const [isDev, isDebug] = await Promise.all([get('dev'), get('debug')])
return {
'process.dev': dev,
'import.meta.dev': dev,
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: isDebug,
'process.dev': isDev,
'import.meta.dev': isDev,
'process.test': isTest,
'import.meta.test': isTest,
...val
Expand Down

0 comments on commit f5a44fb

Please sign in to comment.