We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72fceed commit a180b7bCopy full SHA for a180b7b
docs/next-js/next.config.ts
@@ -2,6 +2,7 @@ import type { NextConfig } from "next";
2
3
const isProd = process.env.NODE_ENV === 'production';
4
const basePath = isProd ? (process.env.BASE_PATH || '') : '';
5
+const assetPrefix = isProd ? (basePath ? `${basePath.replace(/\/$/, '')}/` : './') : '';
6
7
console.log("BASE_PATH", basePath)
8
@@ -10,7 +11,7 @@ const nextConfig: NextConfig = {
10
11
output: 'export' as const,
12
basePath: basePath,
13
trailingSlash: true,
- // assetPrefix: assetPrefix,
14
+ assetPrefix: assetPrefix,
15
images: {
16
unoptimized: true,
17
},
0 commit comments