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

[v5] [icons] fix default icon loader, add more built-in webpack loaders #6218

Merged
merged 9 commits into from
Jun 14, 2023

Conversation

adidahiya
Copy link
Contributor

@adidahiya adidahiya commented Jun 13, 2023

Changes proposed in this pull request:

  • [icons] Fix a bundle size regression caused by [v5] [icons] feat: reduce bundle size, load paths instead of components #6212
    • In that PR, the default icon loader function was changed to use multiple variables in its import path, which broke the webpack optimization which allowed us to omit generated/components modules from the resulting bundle.
    • This change fixes the default loader function to use two paths which have static parts for the icon sizes (16px and 20px)
  • [icons] feat: Add support to IconLoaderOptions for multiple built-in webpack-annotated loaders: "webpack-lazy-once" (default), "webpack-lazy", and "webpack-eager"
  • [icons] feat: Add new API Icons.setLoaderOptions() to globally specify an icon loader so that it doesn't have to be set on each call to Icons.load()
  • [icons] ⚠️ deprecation: iconNameToPathsRecordKey (use getIconPaths instead)
  • [webpack-build-scripts] fix: omit extracted LICENSE.txt comment files from bundler output

Reviewers should focus on:

No regressions in docs-app, demo-app

Screenshot

webpack-bundle-analyzer visualization:

Before After
image image
image image

@adidahiya adidahiya changed the title [v5] [icons] fix default icon loader, add built-in webpack-eager mode [v5] [icons] fix default icon loader, add more built-in webpack loaders Jun 13, 2023
@adidahiya
Copy link
Contributor Author

fix path in generated component file

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@adidahiya adidahiya marked this pull request as ready for review June 13, 2023 21:59
@adidahiya
Copy link
Contributor Author

rename new API

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@adidahiya
Copy link
Contributor Author

remove references to allPaths

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@adidahiya adidahiya merged commit 9be9a5f into next Jun 14, 2023
@adidahiya adidahiya deleted the ad/v5-icons-bundle-size branch June 14, 2023 00:03
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