Closed Artur- closed 1 week ago
Attention: Patch coverage is 78.57143%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 94.41%. Comparing base (
9ee4b80
) to head (3436511
). Report is 2 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
This ticket/PR has been released with Hilla 24.5.0.beta2 and is also targeting the upcoming stable 24.5.0 version.
HMR now works as following:
When a file inside the
views
folder changes, the vite plugin for the file router picks that up. After writing file-routes.ts and file-routes.json with the new data, it fires afs-route-update
event through the Vite event bus. It is important to writefile-routes.ts
also when its contents does not change but some meta info in a view has changed (i.e. when the json file changes). This will propagate the new meta data also to the router configuration.The custom HMR code in
createMenuItems.ts
reacts to this events and initiates a re-fetch ofwindow.Vaadin.views
from the server. Once the new data is available, the signal the menu is based upon is updated and the menu re-rendered.Vite reacts on
file-routes.ts
being changed and propagates HMR events to its importers, which typically isindex.tsx
that configures the react router using the routes andvaadin-react.tsx
which stores the routes so that the Flow router integration can access them.index.tsx
reacts to the HMR event by re-rendering the full application with the new routes, updating the React router configuration.Fixes #2749