From c737df4b89590b9ee479d52266429df25187c2c9 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Wed, 20 May 2026 12:50:28 +0200 Subject: [PATCH] fix(filters): inline FiltersButton props instead of Pick-ing ButtonProps Same nuxt 4.4.6 SFC compiler regression that hit ChatPrompt: using `Pick & { ... }` in defineProps trips @vue/compiler-sfc's "Failed to resolve import source 'vue-chrts/types'" when it follows the type chain through Nuxt's generated imports.d.ts. Switch to inline props with indexed-access types (`ButtonProps['color']` etc.), which keeps type-safety without forcing the SFC compiler to flatten the base type. Verified locally with nuxt@4.4.6: pnpm build + pnpm typecheck both green. Co-Authored-By: Claude Opus 4.7 (1M context) --- app/components/filters/FiltersButton.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/components/filters/FiltersButton.vue b/app/components/filters/FiltersButton.vue index 627398c..cc3aebd 100644 --- a/app/components/filters/FiltersButton.vue +++ b/app/components/filters/FiltersButton.vue @@ -2,8 +2,13 @@ import type { ButtonProps, ButtonSlots } from '@nuxt/ui' import type { Filter } from '~/composables/useFilters' -withDefaults(defineProps & { +withDefaults(defineProps<{ filter: Filter + color?: ButtonProps['color'] + variant?: ButtonProps['variant'] + activeColor?: ButtonProps['activeColor'] + activeVariant?: ButtonProps['activeVariant'] + active?: boolean }>(), { color: 'neutral', variant: 'outline',