fix(filters): inline FiltersButton props to avoid nuxt 4.4.6 SFC regression#57
fix(filters): inline FiltersButton props to avoid nuxt 4.4.6 SFC regression#57benjamincanac wants to merge 1 commit into
Conversation
Same nuxt 4.4.6 SFC compiler regression that hit ChatPrompt: using
`Pick<ButtonProps, ...> & { ... }` 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) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Follow-up to #56. After fixing
ChatPrompt, renovate's nuxt 4.4.6 bump (#54) still fails on Vercel, this time onFiltersButton.vue:```
[vite:vue] [@vue/compiler-sfc] Failed to resolve import source "vue-chrts/types".
.nuxt/types/imports.d.ts:515
export type { BulletLegendItemInterface, ... } from 'vue-chrts/types'
file: app/components/filters/FiltersButton.vue
```
Same regression class: nuxt 4.4.6's bundled
@vue/compiler-sfcfollows external type chains more aggressively when resolvingdefineProps<ExternalType & {...}>/defineProps<Pick<ExternalType, ...> & {...}>, tripping overnuxt-charts's auto-importedvue-chrts/typessource (which has no runtime export).Switch
FiltersButtonto inline props with indexed-access types (ButtonProps['color']etc.) — keeps type-safety without forcing the SFC compiler to flattenButtonProps.Reproduced locally on
nuxt@4.4.6; with this changepnpm build+pnpm typecheckare both green.Test plan
pnpm add nuxt@4.4.6.pnpm buildandpnpm typecheckpass with the fix onnuxt@4.4.6.nuxt@4.4.6.🤖 Generated with Claude Code