This works ok with Vaadin 14, but no longer works with Vaadin 23.
I inspected the frontend bundle and saw the css imported by @JsModule was there, but for some reason styles are not applied. There is no server or console errors.
When I refactored the add-on to be web component and import the styles in web component instead, they work
Description of the bug
My badge add-on is importing Lumo badge styles using include parameter
https://github.com/TatuLund/badge/blob/master/src/main/java/org/vaadin/addons/badge/Badge.java#L19
This works ok with Vaadin 14, but no longer works with Vaadin 23.
I inspected the frontend bundle and saw the css imported by
@JsModule
was there, but for some reason styles are not applied. There is no server or console errors.When I refactored the add-on to be web component and import the styles in web component instead, they work
See https://github.com/TatuLund/badge/blob/v23/src/main/resources/META-INF/resources/frontend/badge.ts#L2
This proves that problem is not in
@JsModule
, but@CssImport
Note, include parameter works ok when using in the main app, as is seen e.g. here: https://cookbook.vaadin.com/grid-pro-conditional-edit
Expected behavior
@CssImport
with include parameter to work in add-on / jar modulesMinimal reproducible example
Badge add-on V14 version of the code.
Versions