mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
less edgy config (ci)
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { get } from "@vercel/edge-config";
|
import { get } from "@vercel/edge-config";
|
||||||
import { isDevelopment } from "./utils";
|
|
||||||
|
import { isBuildPhase } from "./next";
|
||||||
|
|
||||||
type EdgeConfig = {
|
type EdgeConfig = {
|
||||||
[domainWithDash: string]: {
|
[domainWithDash: string]: {
|
||||||
@@ -31,6 +32,11 @@ export function edgeDomainToKey(domain: string) {
|
|||||||
export async function getConfig() {
|
export async function getConfig() {
|
||||||
const domain = new URL(process.env.NEXT_PUBLIC_SITE_URL!).hostname;
|
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") {
|
if (process.env.NEXT_PUBLIC_ENV === "development") {
|
||||||
return require("../../config").localConfig;
|
return require("../../config").localConfig;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user