fix(react): apply vercel best practices#656
Open
claude[bot] wants to merge 1 commit into
Open
Conversation
Add optimizePackageImports for lucide-react in apps/design and apps/dev to eliminate barrel import cost (~200-800ms per cold start). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
rbadillap
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated review using vercel-react-best-practices skill. Run: https://github.com/synerops/syner/actions/runs/24784429583
Changes
Added
optimizePackageImports: ['lucide-react']to the Next.js experimental config forapps/designandapps/dev.Rule violated:
bundle-barrel-imports(CRITICAL impact)lucide-reactis a barrel file with 1,583+ modules. WithoutoptimizePackageImports, every import likeimport { ArrowRight } from 'lucide-react'loads the entire library, adding 200–800ms to cold starts.Affected apps:
apps/design— imports ArrowRight, Palette, Type, MessageSquare, Layout, Grid3X3, PanelTop, PanelBottom, Settings, Activity, Database, Zap, Shield, Codeapps/dev— imports Copy, CheckFix: Next.js 13.5+
optimizePackageImportstransforms barrel imports to direct module paths at build time, preserving full TypeScript support while eliminating the barrel cost.Scan summary
38 TSX files reviewed across
apps/**/*.tsxandpackages/ui/**/*.tsx.Other rules checked (no violations found):
rendering-conditional-render— no numeric&&conditionsrerender-no-inline-components— SkillCard defined at module level, not inlinerendering-hoist-jsx— no static JSX inside render functions that could be hoistedrerender-memo-with-default-value— no memoized components with non-primitive default propsserver-hoist-static-io— fonts already hoisted to module level in layouts