[EuiIcon] Move icon assets to a new package
- Dominant language
- TypeScript
- Stars
- 6.4k
- Forks
- 911
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 69
Description
# Summary
As part of the [EuiIcon refactor initiative](https://github.com/elastic/eui/issues/8860), we want to separate SVG icon assets and generated icon components (with [svgr](https://github.com/gregberge/svgr)) from EuiIcon sources.
While this isn't mandatory from performance or bundler support perspectives, it'll allow us to separate concerns, cache built icons locally between runs, version them separately, create multiple icon bundles, and much more.
# Acceptance criteria
* A new `icons` package is created in `packages/icons` (`@elastic/eui-icons`)
* All icon assets are moved from `packages/eui/src/components/icon/svgs` and `packages/eui/src/components/icon/assets` to the icons package
* The `compile-icons` script (including related dependencies and configuration files) should be moved to `packages/icons` and renamed to `build`
* Built icons should live inside the `packages/icons/dist` directory
* `EuiIcon` should be deprecated in favor of icon components imported from the package
Contributor guide
Assessment
This issue has not been assessed yet.