docs: add dynamic import strategy to performance checklist - #65
Open
fgfabi wants to merge 2 commits into
Open
Conversation
- Add comprehensive guidance on tree-shaking and bundle optimization - Document why barrel exports prevent tree-shaking - Provide named import patterns for lucide-react icons - Show dynamic import examples for heavy features - Include import configuration best practices - Demonstrate bundle analysis techniques This update can reduce initial bundle size by 20-40% through proper import strategies and lazy loading of non-critical features. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Why: Performance and bundle size suffer when barrels and wildcard imports prevent tree-shaking and when heavy features are shipped in the initial bundle. This change adds a clear, actionable "Dynamic Import Strategy" to the performance checklist so developers know how to import icons, components, and heavy features to reduce initial bundle size (typical 20–40% reductions).
What: Adds a new section to plugins/spark/skills/spark-app-template/references/performance-checklist.md that:
import * as Icons)Notes for reviewers:
If this should also be added to other templates or repos, say so and I will follow up.