ecoacoustics / web-components

https://oe-web-components.netlify.app/
MIT License
1 stars 0 forks source link

Fix: Icons not being included in production build #156

Closed hudson-newey closed 2 months ago

hudson-newey commented 2 months ago

Fix: Icons not being included in the production build

Previously, shoelace icons were not bundled during a production build, meaning that the media controls and other similar locations would have an empty placeholder where the icon should be.

This PR adds the shoelace icons to the production build by assigning each icon's SVG to a variable in the bundle's barrel file.

I have chosen this solution because

Changes

Features

N.A.

Bug Fixes

Code Quality

Remaining Bugs / Unresolved Problems

Visual Changes

image

Icons remain unchanged, but I have included a screenshot in case you can spot any discrepancies

Documentation Examples

https://66cd6037baf6ea88c3fb7d86--oe-web-components.netlify.app/examples/verification/single/

Related Issues

Fixes: #98

Additional Notes

CI Netlify deployment is currently broken because LucideJS shipped a breaking change in a minor version which caused 11ty documentation generation to tempoarily break.

Final Checklist

github-actions[bot] commented 2 months ago

🚀 Deployed on https://66cd7f24bb1032a3cdd054ce--oe-web-components.netlify.app

hudson-newey commented 2 months ago

Here a mock-up of an example using registerBundledIcons

image

Pros:

Cons:

Relevant commit: 12f36fd (#156)