Skip to content

Fix icon load #10777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

Fix icon load #10777

wants to merge 4 commits into from

Conversation

charlesBochet
Copy link
Member

Context

We recently upgrade from tabler/react-icons 2 to 3. They have changed the way components are exposed and somehow this was forcing our vite build to create a chunk by icon even if we don't use them

Fix

https://www.reddit.com/r/reactjs/comments/1g3tsiy/trouble_with_vite_tablericons_5600_requests/

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR addresses performance issues with @tabler/icons-react v3 integration, specifically fixing Vite's chunking behavior that was creating individual chunks for each icon.

  • Removed AllIcons.ts to prevent unnecessary icon bundling and improve build performance
  • Added @tabler/icons-react to external dependencies in packages/twenty-front/vite.config.ts to prevent individual icon chunking
  • Added ESM alias for @tabler/icons-react in Vite config to ensure proper module resolution
  • Commented out lazy loading in IconsProvider.tsx, but needs validation to ensure icons state is properly initialized

3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

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.

3 participants