fix(svelte-query): suppress false positive unused import warnings#10071
fix(svelte-query): suppress false positive unused import warnings#10071DACONLEEHANGYU wants to merge 1 commit intoTanStack:mainfrom
Conversation
Fixes TanStack#9740 Added rollup onwarn handler to suppress UNUSED_EXTERNAL_IMPORT warnings for @tanstack/query-core imports. These warnings are false positives as the imports (notifyManager, replaceEqualDeep) are actually used in the compiled code but Rollup's tree-shaking analysis fails to detect this in Svelte 5's runes context ($effect, $state, $derived). The warning appeared during SvelteKit project builds mentioning: - notifyManager (used in createMutation.svelte.ts) - replaceEqualDeep (used in useMutationState.svelte.ts)
|
📝 WalkthroughWalkthroughA Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
Fixes #9740
Added rollup onwarn handler to suppress UNUSED_EXTERNAL_IMPORT warnings for @tanstack/query-core imports. These warnings are false positives as the imports (notifyManager, replaceEqualDeep) are actually used in the compiled code but Rollup's tree-shaking analysis fails to detect this in Svelte 5's runes context ($effect, $state, $derived).
The warning appeared during SvelteKit project builds mentioning:
🎯 Changes
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.