diff --git a/space/next.config.js b/space/next.config.js index 0b0ccadb5..712c1c472 100644 --- a/space/next.config.js +++ b/space/next.config.js @@ -1,15 +1,18 @@ /** @type {import('next').NextConfig} */ const path = require("path"); -const withImages = require("next-images") +const withImages = require("next-images"); -const nextConfig = withImages({ - basePath: "/spaces", +const nextConfig = { reactStrictMode: false, swcMinify: true, experimental: { outputFileTracingRoot: path.join(__dirname, "../"), }, output: "standalone", -}); +}; -module.exports = nextConfig; +if (parseInt(process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX || "0")) { + const nextConfigWithNginx = withImages({ basePath: "/spaces", ...nextConfig }); +} else { + module.exports = nextConfig; +} diff --git a/turbo.json b/turbo.json index 69da3c552..47b92f0db 100644 --- a/turbo.json +++ b/turbo.json @@ -24,7 +24,8 @@ "NEXT_PUBLIC_SLACK_CLIENT_SECRET", "NEXT_PUBLIC_SUPABASE_URL", "NEXT_PUBLIC_SUPABASE_ANON_KEY", - "NEXT_PUBLIC_PLAUSIBLE_DOMAIN" + "NEXT_PUBLIC_PLAUSIBLE_DOMAIN", + "NEXT_PUBLIC_DEPLOY_WITH_NGINX" ], "pipeline": { "build": {