Files
snapcad-studio/apps/web/next.config.ts
T

27 lines
676 B
TypeScript
Raw Normal View History

2026-06-06 23:10:29 +03:00
import type { NextConfig } from "next";
const isStaticExport = process.env.STATIC_EXPORT === "true";
2026-06-14 22:05:58 +03:00
const extraAllowedDevOrigins = (process.env.SKETCHFORGE_ALLOWED_DEV_ORIGINS ?? "")
.split(",")
.map((origin) => origin.trim())
.filter(Boolean);
2026-06-06 23:10:29 +03:00
const nextConfig: NextConfig = {
devIndicators: false,
2026-06-14 22:05:58 +03:00
allowedDevOrigins: ["localhost", "127.0.0.1", ...extraAllowedDevOrigins],
env: {
NEXT_PUBLIC_STATIC_EXPORT: isStaticExport ? "true" : "false",
},
2026-06-06 23:10:29 +03:00
images: {
unoptimized: true
},
...(isStaticExport
? {
output: "export" as const,
trailingSlash: true,
assetPrefix: "./",
}
: {}),
};
export default nextConfig;