You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ReactRouterOutletElement.tsx breaks build of Flow application using vaadin-router #19842
If the Flow application is configured to use vaadin-router instead of react-router (e.g. by setting reactEnable=false in vaadin-maven-plugin), the production build fails on Vite execution because react-router-dom import cannot be resolved.
[ERROR] [vite]: Rollup failed to resolve import "react-router-dom" from "/xxxxx/vaadin/starters/skeleton-starter-flow-spring/src/main/frontend/generated/jar-resources/ReactRouterOutletElement.tsx".
[ERROR] This is most likely unintended because it can break your application at runtime.
[ERROR] If you do want to externalize this module explicitly add it to
The workaround is to exclude the flow-react dependency in the POM file.
If it is expected that flow-react should be excluded when using vaadin-router, it should be explicitly documented. In the upgrade guide it looks like an optional step.
Expected behavior
A Flow application using vaadin-router should not fail during build even if flow-react dependency is present.
changed the title [-]ReactRouterOutletElement.tsx breaks Flow application using vaadin-router[/-][+]ReactRouterOutletElement.tsx breaks build of Flow application using vaadin-router[/+]on Aug 28, 2024
Activity
[-]ReactRouterOutletElement.tsx breaks Flow application using vaadin-router[/-][+]ReactRouterOutletElement.tsx breaks build of Flow application using vaadin-router[/+]mshabarov commentedon Aug 28, 2024
We can keep in mind the documentation upgrade, but better to fix this in the code.
fix: React file not added when reactEnabled false
fix: React file not added when reactEnabled false
fix: React file not added when reactEnabled false (#19845)
vaadin-bot commentedon Aug 30, 2024
This ticket/PR has been released with Vaadin 24.5.0.alpha13 and is also targeting the upcoming stable 24.5.0 version.