Skip to content

Commit

Permalink
fix: always generate routes.tsx (#19749)
Browse files Browse the repository at this point in the history
Always generate the routes.tsx
into frontend/generated. Even
when routes.tsx is defined in
frontend by the developer so
that it can be used as an example.

Fixes #19179
  • Loading branch information
caalador authored Aug 6, 2024
1 parent b817168 commit 767aa0b
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,14 @@ private void doExecute() throws ExecutionFailedException {
"{{VAADIN_VERSION}}", Version.getFullVersion());
writeFile(reactAdapterTsx, reactAdapterContent);
}
if (!routesTsx.exists()) {
boolean isHillaUsed = FrontendUtils.isHillaUsed(
frontendDirectory, options.getClassFinder());
writeFile(frontendGeneratedFolderRoutesTsx,
getFileContent(isHillaUsed ? FrontendUtils.ROUTES_TSX
: FrontendUtils.ROUTES_FLOW_TSX));
} else {

boolean isHillaUsed = FrontendUtils.isHillaUsed(frontendDirectory,
options.getClassFinder());
writeFile(frontendGeneratedFolderRoutesTsx,
getFileContent(isHillaUsed ? FrontendUtils.ROUTES_TSX
: FrontendUtils.ROUTES_FLOW_TSX));

if (routesTsx.exists()) {
track(routesTsx);
String routesContent = FileUtils.readFileToString(routesTsx,
UTF_8);
Expand Down

0 comments on commit 767aa0b

Please sign in to comment.