Skip to content

Commit 19c2b27

Browse files
committed
add back basePath for vercel
1 parent 824ff3f commit 19c2b27

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

next.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
22
enabled: false, //process.env.ANALYZE === 'true',
33
});
44

5+
const isProd = process.env.VERCEL_ENV === "production"; // or NODE_ENV === 'production'
6+
57
module.exports = withBundleAnalyzer({
68
swcMinify: true,
79
reactStrictMode: true,
810
output: "standalone",
11+
basePath: isProd ? "/try/sandbox" : "",
12+
assetPrefix: isProd ? "/try/sandbox/" : "",
913
});

0 commit comments

Comments
 (0)