Addon resources not updated without clean, dance, and install.

Hi, I am building an addon. Vaadin 23. There are two modules, addon and demo. The addon module has TS files in META-INF/resources/frontend/src. The demo module uses them with @JsModule. I noticed that if I change a TS file in the addon module and restart the demo module app, the changes are not reflected. The consistent solution is to mvn clean, vaadin:dance, install, run the demo module app again. Any idea why? Could it be Vite is caching?

AFAIK the tooling don’t know anything about Maven, just gets the resources through the actual artifact, that’s why you need to to build the add-on before the demo can detect the changes.

I tend to develop the add-on in the add-on module directly. Have jetty (or spring boot) configured there to run test UIs (and possibly integration tests). This way changes to the add-on (and the test UIs) gets picked up by live reload properly. Then the demo is different, but when developing that, one shouldn’t need to be constantly building the add-on anyjore.

For our designer building themes, I hacked together a setup where the demo is built from the same UI classes what where in the “addon” project (in src/test/java/). For the demo project I added a build step that simply copies the classes from the actual add-on project.

It was because Vite didn’t detect changes in target/flow-frontend. Fixed in Vaadin 23.3.

Thank you for your suggestions.