Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

chore: add comments for vite-optimize-vue-devtools-agent plugin configuration in nuxt.config.ts

Ahmet Ömer6f833155e30c
diff --git a/apps/self-hosted/nuxt.config.ts b/apps/self-hosted/nuxt.config.ts
index 9548657d..ae90345a 100644
--- a/apps/self-hosted/nuxt.config.ts
+++ b/apps/self-hosted/nuxt.config.ts
@@ -217,12 +217,17 @@ export default defineNuxtConfig({
},
},
plugins: [
+ // Prebundle safe-stable-stringify for the Vite client. [email protected]
+ // (via @nuxt/[email protected]) dynamically imports @vue/devtools-agent/devframe,
+ // whose ESM wrapper default-imports that package's CommonJS build.
+ // Remove this plugin and the direct devDependency on the next @nuxt/devtools bump
+ // if a cold dev session no longer logs "[vue-devtools] Failed to register agent tools"
+ // for safe-stable-stringify.
{
name: 'vite-optimize-vue-devtools-agent',
apply: 'serve',
configEnvironment(name, config) {
if (name !== 'client') return
- // Vue DevTools loads this CommonJS dependency lazily in the browser.
config.optimizeDeps ??= {}
config.optimizeDeps.include ??= []
config.optimizeDeps.include.push('safe-stable-stringify')