Skip to content

Commit e9be80f

Browse files
committed
Fix Angular SSR deployment on Windows
fixes #6543
1 parent cf9379f commit e9be80f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/frameworks/angular/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { WorkspaceNodeModulesArchitectHost } from "@angular-devkit/architec
55
import { AngularI18nConfig } from "./interfaces";
66
import { relativeRequire, validateLocales } from "../utils";
77
import { FirebaseError } from "../../error";
8-
import { join } from "path";
8+
import { join, posix, sep } from "path";
99
import { BUILD_TARGET_PURPOSE } from "../interfaces";
1010
import { AssertionError } from "assert";
1111
import { assertIsString } from "../../utils";
@@ -420,7 +420,7 @@ export async function getServerConfig(sourceDir: string, configuration: string)
420420
}
421421
const browserTargetOptions = await architectHost.getOptionsForTarget(buildOrBrowserTarget);
422422
assertIsString(browserTargetOptions?.outputPath);
423-
const browserOutputPath = join(browserTargetOptions.outputPath, buildTarget ? "browser" : "");
423+
const browserOutputPath = join(browserTargetOptions.outputPath, buildTarget ? "browser" : "").split(sep).join(posix.sep);
424424
const packageJson = JSON.parse(await host.readFile(join(sourceDir, "package.json")));
425425

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

0 commit comments

Comments
 (0)