2023-08-08 07:25:42 +00:00
|
|
|
/** @type {import('next').NextConfig} */
|
2023-08-21 19:43:51 +00:00
|
|
|
const path = require("path");
|
2023-09-03 15:25:37 +00:00
|
|
|
const withImages = require("next-images");
|
2023-08-08 07:25:42 +00:00
|
|
|
|
2023-09-03 15:25:37 +00:00
|
|
|
const nextConfig = {
|
2023-08-21 12:42:41 +00:00
|
|
|
reactStrictMode: false,
|
|
|
|
swcMinify: true,
|
2023-08-08 07:25:42 +00:00
|
|
|
experimental: {
|
2023-09-03 13:20:30 +00:00
|
|
|
outputFileTracingRoot: path.join(__dirname, "../"),
|
2023-08-08 07:25:42 +00:00
|
|
|
},
|
2023-10-27 07:44:03 +00:00
|
|
|
images: {
|
|
|
|
unoptimized: true,
|
|
|
|
},
|
2023-08-21 19:43:51 +00:00
|
|
|
output: "standalone",
|
2023-09-03 15:25:37 +00:00
|
|
|
};
|
2023-08-08 07:25:42 +00:00
|
|
|
|
2023-09-03 15:25:37 +00:00
|
|
|
if (parseInt(process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX || "0")) {
|
2023-09-12 15:02:26 +00:00
|
|
|
const nextConfigWithNginx = withImages({
|
|
|
|
basePath: "/spaces",
|
|
|
|
...nextConfig,
|
|
|
|
});
|
2023-09-04 12:25:40 +00:00
|
|
|
module.exports = nextConfigWithNginx;
|
2023-09-03 15:25:37 +00:00
|
|
|
} else {
|
|
|
|
module.exports = nextConfig;
|
|
|
|
}
|