From 0166854b566946b8ec09eee1232b5c09d3d96318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Tue, 17 Nov 2026 16:32:05 +0000 Subject: [PATCH 1/2] perf: stop preloading the search worker on every page nuxt-workers starts the search worker with new Worker(new URL(...)), so Vite lists the bundle as an asset of the entry and the renderer preloaded its 270 KB on every page. The palette loads it when it opens. Amp-Thread-ID: https://ampcode.com/threads/T-01a1e525-9983-7071-a70a-d5ef82f1ba95 --- nuxt.config.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nuxt.config.ts b/nuxt.config.ts index 2888d6c55..df0caac13 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -652,6 +652,20 @@ export default defineNuxtConfig({ component.global = false } } + }, + 'build:manifest': (manifest) => { + // `nuxt-workers` starts workers with `new Worker(new URL(…))`, which Vite lists as a script asset of + // the chunk that does it. The renderer then preloads it on every page: the 270 KB search worker, + // only needed once the palette opens, at a priority Lighthouse counts as render-blocking. + for (const chunk of Object.values(manifest)) { + for (const asset of chunk.assets ?? []) { + const resource = manifest[asset] + if (resource?.resourceType === 'script') { + resource.preload = false + resource.prefetch = false + } + } + } } }, agentDiscovery: { From 6861f5992c11d014209a1bb500af723b73fd9d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Tue, 17 Nov 2026 16:32:06 +0000 Subject: [PATCH 2/2] perf(home): fade the features in with CSS instead of motion-v The features grid was the homepage's only use of , which made motion-v (about 130 KB) part of the chunks it preloads. It also rendered the items with opacity 0 on the server, so they stayed invisible until hydration. Amp-Thread-ID: https://ampcode.com/threads/T-01a1e525-9983-7071-a70a-d5ef82f1ba95 --- app/pages/index.vue | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/app/pages/index.vue b/app/pages/index.vue index e42bac8ff..aab4010e4 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -51,6 +51,9 @@ const pageData = computed(() => page.value?.data) const { health } = useModuleHealth() // The health map loads on the client only: merge it once the modules section hydrated, or its server // HTML (without the health badges) would not match. +// The features fade in once their section hydrates, which happens as it scrolls into view. CSS, not +// ``: motion-v would be the homepage's largest preloaded dependency for this one effect. +const featuresRevealed = ref(false) const modulesHydrated = ref(false) const officialModulesWithHealth = computed(() => (officialModules.value || []).map(m => ({ ...m, health: (modulesHydrated.value && health.value[m.name]) || m.health || null })) @@ -257,29 +260,24 @@ useNuxtBirthday() root: 'bg-linear-to-b border-t border-default from-muted dark:from-muted/40 to-default', features: 'xl:grid-cols-4 lg:gap-10' }" + @hydrated="featuresRevealed = true" > @@ -623,3 +621,22 @@ useNuxtBirthday() + +