fix(env-repair): replace dynamic import with static to fix prod build (#1601)

Integrated into release/v3.7.0
This commit is contained in:
Jean Brito
2026-04-25 15:29:24 -03:00
committed by GitHub
parent 1f66b67309
commit 17b5a8540e

View File

@@ -7,14 +7,13 @@
*/
import { copyFileSync, existsSync } from "node:fs";
import { join } from "node:path";
import { pathToFileURL } from "node:url";
import { NextResponse } from "next/server";
import { isAuthenticated } from "@/shared/utils/apiAuth";
const SYNC_HELPER_PATH = join(process.cwd(), "scripts/sync-env.mjs");
// @ts-expect-error - .mjs without types
import { getEnvSyncPlan, syncEnv } from "../../../../../../scripts/sync-env.mjs";
async function loadSyncHelpers() {
return import(pathToFileURL(SYNC_HELPER_PATH).href);
return { getEnvSyncPlan, syncEnv };
}
function createEnvBackup() {