Skip to content

Commit ae6af87

Browse files
committed
chore: enable hydration debugging only in prod
1 parent ed6bf6f commit ae6af87

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

modules/production.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { defineNuxtModule, useNuxt } from 'nuxt/kit'
2+
import { defu } from 'defu'
3+
import { isCI, provider } from 'std-env'
4+
5+
export default defineNuxtModule({
6+
meta: {
7+
name: 'prod-env',
8+
},
9+
setup() {
10+
const nuxt = useNuxt()
11+
12+
if (isCI && provider !== 'github_actions') {
13+
nuxt.options.debug = defu(nuxt.options.debug, { hydration: true })
14+
}
15+
},
16+
})

nuxt.config.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ export default defineNuxtConfig({
3939

4040
css: ['~/assets/main.css', 'vue-data-ui/style.css'],
4141

42-
$production: {
43-
debug: {
44-
hydration: true,
45-
},
46-
},
47-
4842
runtimeConfig: {
4943
sessionPassword: '',
5044
// Upstash Redis for distributed OAuth token refresh locking in production

0 commit comments

Comments
 (0)