custom icons not showing

i have a folder of icons (svg) and put it into https://vaadin.com/docs/latest/components/icons it gave me 2 files and i put the js file infrontend/icons and the java file in the package but for some reason the icons arent showing in the final page. anyone know why?
image.png

Icons.BIOHAZARD_SOLID.create()```

I think you might need to relocate the js file to src/main/resources/META-INF/resources/frontend

e.g.
src/main/resources/META-INF/frontend/icons/icons.js
and
@JsModule("./icons/icons.js")

alright I’ll try it, it was just a bit weird because it worked fine till I added more icons

ah well in that case I’m not so sure what the issue is. It could be a problem in the generated iconset

I’m always a bit uncertain where to put files that need to be served on the clientside, but according to this page https://vaadin.com/docs/latest/create-ui/web-components/#adding-front-end-files, src/main/resources/META-INF/frontend should map to ./. I’m not sure if the root frontend folder works in a production build

The root frontend folder works perfectly fine in prod - it’s my favorite location for all frontend related files (css/js/ts)

hmm, my impression is that the root frontend folder doesn’t necessarily work depending on how the application is packaged (JAR vs WAR) or maybe depending on whether it’s a Spring Boot app or something else, but that the themes/ folder has some special handling that automagically copies all non-CSS files to the resources folder. I might be wrong here though – perhaps the entire frontend folder is copied to resources, but since stylesheets in the frontend folder are bundled, it’s at least unreliable for css files…

There have been some changes to this in recent(ish) versions, so frankly I’m not entirely sure what the case is in V23.

At least for V23 Spring Boot (jar) based applications I can confirm that placing a folder “my-components” next to the themes folder and importing js/ts from there with @JsModule(“./my-components/…”) works

oookay, good to know. I think I’ll try to clarify what the official story is from the Flow team. I don’t think it’s properly documented anywhere.