fixing vercel deployments by switching next config using env (#2067)
This commit is contained in:
parent
1e152c666c
commit
4ea52302ba
2 changed files with 10 additions and 6 deletions
|
|
@ -1,15 +1,18 @@
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const withImages = require("next-images")
|
const withImages = require("next-images");
|
||||||
|
|
||||||
const nextConfig = withImages({
|
const nextConfig = {
|
||||||
basePath: "/spaces",
|
|
||||||
reactStrictMode: false,
|
reactStrictMode: false,
|
||||||
swcMinify: true,
|
swcMinify: true,
|
||||||
experimental: {
|
experimental: {
|
||||||
outputFileTracingRoot: path.join(__dirname, "../"),
|
outputFileTracingRoot: path.join(__dirname, "../"),
|
||||||
},
|
},
|
||||||
output: "standalone",
|
output: "standalone",
|
||||||
});
|
};
|
||||||
|
|
||||||
|
if (parseInt(process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX || "0")) {
|
||||||
|
const nextConfigWithNginx = withImages({ basePath: "/spaces", ...nextConfig });
|
||||||
|
} else {
|
||||||
module.exports = nextConfig;
|
module.exports = nextConfig;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,8 @@
|
||||||
"NEXT_PUBLIC_SLACK_CLIENT_SECRET",
|
"NEXT_PUBLIC_SLACK_CLIENT_SECRET",
|
||||||
"NEXT_PUBLIC_SUPABASE_URL",
|
"NEXT_PUBLIC_SUPABASE_URL",
|
||||||
"NEXT_PUBLIC_SUPABASE_ANON_KEY",
|
"NEXT_PUBLIC_SUPABASE_ANON_KEY",
|
||||||
"NEXT_PUBLIC_PLAUSIBLE_DOMAIN"
|
"NEXT_PUBLIC_PLAUSIBLE_DOMAIN",
|
||||||
|
"NEXT_PUBLIC_DEPLOY_WITH_NGINX"
|
||||||
],
|
],
|
||||||
"pipeline": {
|
"pipeline": {
|
||||||
"build": {
|
"build": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue