less edgy config (ci)

This commit is contained in:
Igor Loskutov
2025-09-04 11:38:26 -04:00
parent c28af33b25
commit 8af6bf4998

View File

@@ -1,5 +1,6 @@
import { get } from "@vercel/edge-config";
import { isDevelopment } from "./utils";
import { isBuildPhase } from "./next";
type EdgeConfig = {
[domainWithDash: string]: {
@@ -31,6 +32,11 @@ export function edgeDomainToKey(domain: string) {
export async function getConfig() {
const domain = new URL(process.env.NEXT_PUBLIC_SITE_URL!).hostname;
if (isBuildPhase) {
// "noop"
return require("../../config-template").localConfig;
}
if (process.env.NEXT_PUBLIC_ENV === "development") {
return require("../../config").localConfig;
}