I like to put some of the CSS file under the static java resources folder ${project}/src/main/resources/META-INF/resources
in Vaadin so I can share it across the different themes and can be loaded and exchanged dynamically at runtime when needed. See also
https://vaadin.com/docs/latest/styling/advanced/loading-styles-dynamically
My Problem: When I do now a production build I noticed that these css files in the resource folder get not compressed for brotli.Only those which are in the ${project}/frontend/themes
folder seems to be picked up. Any idea what can be done so these css files will also be prepared?
Vaadin offers to overwrite the vite config in
vite.config.ts
. There I could add a plugin to compress the additional files.e.g.
vite.config.ts
: