Extract styles once per component using the EnhancedCssBundler
Hi! Thanks for this amazing lib!
I started playing with this and found out that if you use the EnhancedCssBundler and add multiple instances of a component, the style contained in that component file will be extracted as many times as component instances there are.
my-box.html
<style enhanced>.box { color: blue}</style>
<div class="box"><slot></slot></box>
index.html
<my-box>hi</my-box>
<my-box>hi</my-box>
Style will be:
.box[data-p-4700feeb]{color:#00f}.box[data-p-4700feeb]{color:#00f}
Is there a way to extract the style just once given that the id is unique, maybe checking somewhere that there is an style with the same id already extracted?
Thank you!
Edited by santios1