Skip to content

Fix Angular SSR deployment on Windows #6544

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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