[Vite] A server restart occurs on every successful service worker build #13123
Labels
enhancement
prerelease version for Vaadin 23.2.0
Released with Vaadin 23.1.6
Released with Vaadin 23.2.0.beta1
vite
Tickets related to vite support
Describe your motivation
A follow-up to #12928, #12383
There is an issue in the current implementation which is that the Flow server restarts on every successful service worker build. This happens because the output
sw.js
gets written to the/webapp
folder as a result of the build whereas Flow watches that folder and restarts the server when a file changes.One of the consequences is that the "The frontend development build has not yet finished. Please wait..." loader, which you see when starting up the app, sometimes gets stuck when it coincides with a server restart. You'll have to manually reload the loader page when the server is available to continue the process.
It also slows down the initial app start-up.
Describe the solution you'd like
A prototype: 4c8d5b5
The text was updated successfully, but these errors were encountered: