-
Notifications
You must be signed in to change notification settings - Fork 56
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
fix: generate views.json under frontend/generated in dev mode #2234
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2234 +/- ##
=======================================
Coverage 93.77% 93.77%
=======================================
Files 65 65
Lines 1639 1639
Branches 368 368
=======================================
Hits 1537 1537
Misses 67 67
Partials 35 35
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This passes the deployment mode to the FS Router vite plugin so that it can decide where to generate needed file at runtime. Related to: vaadin/hilla#2234
* feat: pass deployment mode to FS Router vite plugin This passes the deployment mode to the FS Router vite plugin so that it can decide where to generate needed file at runtime. Related to: vaadin/hilla#2234 * fix tests * formatter:format
Quality Gate passedIssues Measures |
This ticket/PR has been released with Hilla 24.4.0.alpha18 and is also targeting the upcoming stable 24.4.0 version. |
Description
This changes the location for generating the views.json
(handled by hilla-file-router/src/vite-plugin.ts) to
frontend/generated/
in dev mode. This doesn't changethe location in production mode so it can be loaded as
a resource.
In dev mode, every time the vite-plugin detects changes
in views and generates a new views.json, it sends a
'full-reload' command to the browser, so that the client
requests for index.html to cause a the listener to reload
the latest changes and to modify the response.
Fixes #2213
This PR is followed up by vaadin/flow#19025 so that the
newly added plugin option
isDevMode
could beinitialized properly by the vite.generated.ts
Type of change
Checklist