Javascript and hotswap

Hi

I find myself struggeling with the issue of implementing javascripts into views and I’m wondering whats the best practice when using HotSwap Agent. I am managing to load the javascripts using the @JsModule() with no problem, so this is only a developing issue.

In the ideal world a javascript that is added to the resources/META-INF/frontend/js would be updated on the client when its saved in similare fashion to a css file. This would make developing with js files much faster. Now I need to restart the HotSwap agent and then it needs to rebuild the front-end bundle. This takes so much time that I belive I’m probably doing something wrong.

Am I doing something wrong or is this the way?

There’s a separate hot deploy mode for frontend resources. It’s a bit slower to start so we don’t have it enabled by default. See How to enable live reload in Vaadin for more information.