-
Notifications
You must be signed in to change notification settings - Fork 168
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: Pass route data through window.Vaadin.routesConfig instead of an import #19666
Conversation
acc4061
to
4a11fa2
Compare
flow-server/src/main/resources/com/vaadin/flow/server/frontend/Flow.tsx
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the hmr for react views and server-side live reload with the hybrid app - works as expected. The codes looks good as well.
… import (#19666) Instead of importing routes.js/routes.ts/routes.tsx from the project into Flow.tsx and creating a circular dependency, this moves importing of routes.js to a new file that is always included when react is used vaadin-react.tsx. This file publishes the routes as window.Vaadin.routesConfig so that Flow.tsx can read them from there without directly depending on routes.js Fixes #19658
… import (#19666) (#19670) Instead of importing routes.js/routes.ts/routes.tsx from the project into Flow.tsx and creating a circular dependency, this moves importing of routes.js to a new file that is always included when react is used vaadin-react.tsx. This file publishes the routes as window.Vaadin.routesConfig so that Flow.tsx can read them from there without directly depending on routes.js Fixes #19658 Co-authored-by: Artur <[email protected]>
This ticket/PR has been released with Vaadin 24.5.0.alpha4 and is also targeting the upcoming stable 24.5.0 version. |
Instead of importing
routes.js/routes.ts/routes.tsx
from the project intoFlow.tsx
and creating a circular dependency, this moves importing ofroutes.js
to a new file that is always included when react is usedvaadin-react.tsx
. This file publishes the routes aswindow.Vaadin.routesConfig
so thatFlow.tsx
can read them from there without directly depending onroutes.js
Fixes #19658