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

Update bundle size optimization for Blueprint Icons #44

Closed
amcclain opened this issue May 24, 2023 · 3 comments
Closed

Update bundle size optimization for Blueprint Icons #44

amcclain opened this issue May 24, 2023 · 3 comments
Assignees

Comments

@amcclain
Copy link
Member

Reviewing a recent bundle treemap on our Toolbox app, it looks like the big Blueprint icons package has returned and is taking up a lot of space again. My bet is that something about the path changed, and the workaround we implemented in #25 a while back needs to be updated.

Screenshot 2023-05-23 at 8 11 51 PM
@amcclain
Copy link
Member Author

@cnrudd if you have a chance to review - we could look together tomorrow as I'd like to cut a dev-utils release with an even bigger fix to FontAwesome icons.

@cnrudd
Copy link
Member

cnrudd commented May 24, 2023

Looking now.

@cnrudd
Copy link
Member

cnrudd commented May 24, 2023

This has been fixed in this hoist-dev-utils branch:
https://github.com/xh/hoist-dev-utils/tree/bpIcons (see PR)

and can be tested easily in toolbox branch bpIcons.

BP4 brought in a requirement for using a new method for getting the icon name, which I have added into the requireBlueprintIcons.js file and moved the file (as per discussions) into the hoist-dev-utils project to avoid creating a breaking change dependency between hoist-dev-utils and hoist-react.

(See palantir/blueprint#2193 (comment) for more details on the new method)

I have committed some temporary changes to the package.json files in the bpIcons branches of toolbox and hoist-react that load hoist-dev-utils and hoist-react from specific commits in the bpIcons branches. This makes it much easier to run the project for the purpose of testing this change and to do bundle analysis.

Bundle analysis on the build using the bpIcons branch of hoist-dev-utils shows a much smaller BlueprintJS Icons package.
image

This issue was closed.
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

No branches or pull requests

2 participants