Skip to content
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

fix(itinerary-body): Optimize icon import in AlertsBody. #802

Merged

Conversation

binh-dam-ibigroup
Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup commented Dec 12, 2024

This PR imports a single icon from fa-solid instead of "requiring" the entire library. This change can help reduce the main OTP-RR production bundle size by as much as 2+MB! (See screenshot before/after)

image

Copy link
Collaborator

@miles-grant-ibigroup miles-grant-ibigroup left a comment

Choose a reason for hiding this comment

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

Thank you for catching this!

Copy link
Contributor

@daniel-heppner-ibigroup daniel-heppner-ibigroup left a comment

Choose a reason for hiding this comment

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

Nice catch. I think these imports can sneak in easily through an auto import. Probably a smarter bundle tool would catch this automatically.

@binh-dam-ibigroup binh-dam-ibigroup merged commit 8302ffc into opentripplanner:master Dec 12, 2024
2 checks passed
@binh-dam-ibigroup binh-dam-ibigroup deleted the transit-alert-body-import branch December 12, 2024 22:26
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