Skip to content

Fronted live reload (webpack) stops working after Quarkus live reload restarts the application #71

@mcollovati

Description

@mcollovati

When running quarkus in dev mode, if a Java source code is modified the application gets restarted, but after restart, frontend live reload does not work anymore.

Reason seems to be that, on restart a new WebpackHandler and a new DebugWindowConnection instances are created, but since Vaadin dev-server (webpack) is still running, the DevServerOutputTracker is not recreated, and the old instance triggers reload on the wrong DebugWindowConnection.

With Vite, reload seems to work fine even after Java code changes.

To replicate:

  • Create an application base on starter (e.g. https://github.com/mcollovati/vaadin-quarkus-push-demo)
  • Start the application with mvn quarkus:dev
  • Modify a fronted file (eg frontend/themes/starter-theme/components/vaadin-progress-bar.css) and check that frontend live reload works
  • Modify a Java source code
  • Modify the fronted file again, the browser page will be reload and server side application is restarted
    (Note that sometime page is not reload correctly and errors are reported in the debug window; if so reload page manually).
  • Modify the fronted file again and check that browser is not reloaded

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🔖 Normal Priority (P2)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions