fix(build): serve config and manifest URLs under the router base path (13-07)
A /app/ build still fetched /config.json and /release-manifest.json and failed at boot. The config URL default and a root-relative profile manifest URL now follow VITE_ROUTER_BASE_PATH, and an explicit config URL outside the base fails the build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
2ec59ad9ee
commit
e215c849fb
@@ -136,7 +136,9 @@ export function getBuildConfig(
|
||||
const buildId = environment.VITE_BUILD_ID || "local-build";
|
||||
const commitSha = environment.VITE_COMMIT_SHA || "local";
|
||||
const routerBasePath = environment.VITE_ROUTER_BASE_PATH || "/";
|
||||
const runtimeConfigUrl = environment.VITE_RUNTIME_CONFIG_URL || "/config.json";
|
||||
// 13-07. dist is served under the base path, so the default follows it.
|
||||
const runtimeConfigUrl =
|
||||
environment.VITE_RUNTIME_CONFIG_URL || `${routerBasePath}config.json`;
|
||||
|
||||
return Object.freeze({ buildId, commitSha, routerBasePath, runtimeConfigUrl });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user