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

Calypso build: optionally bundle @wordpress/icons #39158

Open
simison opened this issue Jan 30, 2020 · 4 comments
Open

Calypso build: optionally bundle @wordpress/icons #39158

simison opened this issue Jan 30, 2020 · 4 comments

Comments

@simison
Copy link
Member

simison commented Jan 30, 2020

Via WordPress/gutenberg#19809:

The design team plan to add hundreds/thousands of icons to this (@wordpress/icons) package for third-party users. That makes it impossible to load it as its own script (bundle size). Instead we should encourage its usage via npm and tree-shaking.

FYI @Automattic/team-calypso @sgomes

@sgomes
Copy link
Contributor

sgomes commented Jan 31, 2020

Gutenberg seems to have chosen the SVG-in-JS route for now. In Calypso, we're currently doing icons with SVG spritemaps, which have a number of advantages in terms of runtime and loading performance.

My advice would be to opt out of @wordpress/icons for as long as possible in Calypso, and hopefully by that time the package will have taken a different approach, which @gziolo mentioned as a possibility at the end of the linked Gutenberg PR.

@simison
Copy link
Member Author

simison commented Jan 31, 2020

Thanks for analyzing! FYI @kraftbj @jeherve since the same might apply to Jetpack.

@jeherve
Copy link
Member

jeherve commented Jan 31, 2020

I'll be keeping an eye on this as well, this definitely seems like something we could use in many different areas of Jetpack.

@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been marked as stale and will be closed in seven days. This happened because:

  • It has been inactive in the past 9 months.
  • It isn't a project or a milestone, and hasn’t been labeled `[Pri] Blocker`, `[Pri] High`, `[Status] Keep Open`, or `OSS Citizen`.

You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation.

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

No branches or pull requests

4 participants