Hello,
While upgrading my app to JMIX 3.0 I was pleasantly surprised with the new Aura Theme and decided to let Claude port my theme from Lumo to Aura, letting it edit the default appname-aura folder that studio provides when creating a new project.
Locally it all works but when i deploy the app war to production mode, I get a 404 with themes/appname-aura/styles.css
After doing some attempts, Claude suggested I put these lines in the build.gradle file:
processResources {
from('src/main/frontend/themes/prisma-aura') {
into 'META-INF/resources/themes/prisma-aura'
}
}
According to processResources your Aura styles located in the incorrect directory - src/main/frontend/themes/prisma-aura (i.e. the old location) instead of src/main/resources/META-INF/resources/themes/prisma-aura (the new location). This is why CLAUDE suggested this configuration. Take a look at Vaadin upgrading guide: How to upgrade Vaadin applications
In my opinion, you should make a remark in the Jmix upgrade Documentation concerning the Aura-Theme, that thesrc/main/frontend/themes/ is now moved to src/main/resources/META-INF/resources/themes/.
Yea I agree. You could also have Studio move the files while migrating from 2 to 3.
The Theme section in the documentation still provides instructions based on the old themes API (like themes.json that is now deprecated).
Studio cannot move theme files during migration. Vaadin has not only changed how styles are added - @StyleSheet annotation instead of @Theme annotation. It has also disabled the support for injecting CSS into Vaadin component’s shadow DOM via the components sub-folder in the frontend/themes/<mytheme> folder. This can now be enabled only by the themeComponentStyles feature flag if styles are applied using @Theme. Since @Theme is deprecated, but not removed, the Studio adds themeComponentStyles to make all previous styles work as before. However, moving them is unreliable and prone to bugs.