Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Vite] A server restart occurs on every successful service worker build #13123

Closed
vursen opened this issue Feb 22, 2022 · 2 comments · Fixed by #14182
Closed

[Vite] A server restart occurs on every successful service worker build #13123

vursen opened this issue Feb 22, 2022 · 2 comments · Fixed by #14182

Comments

@vursen
Copy link
Contributor

vursen commented Feb 22, 2022

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

@vursen vursen added enhancement vite Tickets related to vite support labels Feb 22, 2022
@vursen vursen changed the title [Vite] A server restart occurs when the service worker build completes [Vite] A server restart occurs on every successful service worker build Feb 22, 2022
mcollovati pushed a commit that referenced this issue Jul 19, 2022
Prevents restart of application during startup.

Fixes #13123
Fixes #14022
mshabarov pushed a commit that referenced this issue Jul 27, 2022
Prevents restart of application during startup.

Fixes #13123
Fixes #14022

Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>
mshabarov pushed a commit that referenced this issue Jul 28, 2022
Prevents restart of application during startup.

Fixes #13123
Fixes #14022

Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>

(cherry picked from commit d391029)
mshabarov added a commit that referenced this issue Jul 28, 2022
Prevents restart of application during startup.

Fixes #13123
Fixes #14022
Fixes #14146

Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>

(cherry picked from commit d391029)

Co-authored-by: Marco Collovati <marco@vaadin.com>
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 23.1.6.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 23.2.0.beta1 and is also targeting the upcoming stable 23.2.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

2 participants