We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 689edcd commit 1baeabaCopy full SHA for 1baeaba
next.config.js
@@ -2,8 +2,12 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
2
enabled: false, //process.env.ANALYZE === 'true',
3
});
4
5
+const isProd = process.env.VERCEL_ENV === "production"; // or NODE_ENV === 'production'
6
+
7
module.exports = withBundleAnalyzer({
- swcMinify: true, // Enable SWC minification
8
+ swcMinify: true,
9
reactStrictMode: true,
- output: "standalone", // lightweight standalone app
10
+ output: "standalone",
11
+ basePath: isProd ? "/try/sandbox" : "",
12
+ assetPrefix: isProd ? "/try/sandbox/" : "",
13
0 commit comments