Skip to content

Commit

Permalink
Fix Angular SSR deployment on Windows
Browse files Browse the repository at this point in the history
fixes #6543
  • Loading branch information
sonallux committed Nov 30, 2023
1 parent cf9379f commit c2fe032
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/frameworks/angular/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { WorkspaceNodeModulesArchitectHost } from "@angular-devkit/architec
import { AngularI18nConfig } from "./interfaces";
import { relativeRequire, validateLocales } from "../utils";
import { FirebaseError } from "../../error";
import { join } from "path";
import { join, posix, sep } from "path";
import { BUILD_TARGET_PURPOSE } from "../interfaces";
import { AssertionError } from "assert";
import { assertIsString } from "../../utils";
Expand Down Expand Up @@ -420,7 +420,9 @@ export async function getServerConfig(sourceDir: string, configuration: string)
}
const browserTargetOptions = await architectHost.getOptionsForTarget(buildOrBrowserTarget);
assertIsString(browserTargetOptions?.outputPath);
const browserOutputPath = join(browserTargetOptions.outputPath, buildTarget ? "browser" : "");
const browserOutputPath = join(browserTargetOptions.outputPath, buildTarget ? "browser" : "")
.split(sep)
.join(posix.sep);
const packageJson = JSON.parse(await host.readFile(join(sourceDir, "package.json")));

if (!ssr) {
Expand Down Expand Up @@ -449,7 +451,9 @@ export async function getServerConfig(sourceDir: string, configuration: string)
);
const serverTargetOptions = await architectHost.getOptionsForTarget(buildOrServerTarget);
assertIsString(serverTargetOptions?.outputPath);
const serverOutputPath = join(serverTargetOptions.outputPath, buildTarget ? "server" : "");
const serverOutputPath = join(serverTargetOptions.outputPath, buildTarget ? "server" : "")
.split(sep)
.join(posix.sep);
if (serverLocales && !defaultLocale) {
throw new FirebaseError(
"It's required that your source locale to be one of the localize options"
Expand Down

0 comments on commit c2fe032

Please sign in to comment.