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} */
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue