Skip to content

⚡ Bolt: Refactor IconifyIcon to remove bundled icon sets#28

Open
sshahriazz wants to merge 1 commit intomainfrom
bolt/optimize-icon-bundling-7727284002569646124
Open

⚡ Bolt: Refactor IconifyIcon to remove bundled icon sets#28
sshahriazz wants to merge 1 commit intomainfrom
bolt/optimize-icon-bundling-7727284002569646124

Conversation

@sshahriazz
Copy link
Collaborator

⚡ Bolt: Refactor IconifyIcon to remove bundled icon sets

💡 What: Refactored apps/client/src/components/base/IconifyIcon.tsx to remove static imports of large icon sets (like material-symbols, mdi, etc.) and the logic that searched through them. The component now passes the icon string directly to @iconify/react, which handles fetching on demand.

🎯 Why: The previous implementation statically bundled multiple full icon sets into the application, resulting in a main bundle size that was ~9MB larger than necessary. This severely impacted initial load time and performance.

📊 Impact:

  • Reduces bundle size by approximately 9MB.
  • First Load JS for pages like Login dropped from ~8.96 MB to ~1.24 MB.

🔬 Measurement:

  1. Run pnpm --filter client build.
  2. Observe the "First Load JS" sizes in the build output.
  3. Compare with pre-optimization sizes.

PR created automatically by Jules for task 7727284002569646124 started by @sshahriazz

- Removes static imports of full icon sets (material-symbols, mdi, etc) which were causing massive bundle bloat.
- Updates IconifyIcon to use on-demand fetching via @iconify/react.
- Reduces initial bundle size by ~9MB.
- Improves initial load time significantly.

Journal: Recorded learning about bundle size bloat from Iconify imports.

Co-authored-by: sshahriazz <34005640+sshahriazz@users.noreply.github.com>
@google-labs-jules
Copy link

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments