Skip to content

Commit a180b7b

Browse files
committed
back
1 parent 72fceed commit a180b7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/next-js/next.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { NextConfig } from "next";
22

33
const isProd = process.env.NODE_ENV === 'production';
44
const basePath = isProd ? (process.env.BASE_PATH || '') : '';
5+
const assetPrefix = isProd ? (basePath ? `${basePath.replace(/\/$/, '')}/` : './') : '';
56

67
console.log("BASE_PATH", basePath)
78

@@ -10,7 +11,7 @@ const nextConfig: NextConfig = {
1011
output: 'export' as const,
1112
basePath: basePath,
1213
trailingSlash: true,
13-
// assetPrefix: assetPrefix,
14+
assetPrefix: assetPrefix,
1415
images: {
1516
unoptimized: true,
1617
},

0 commit comments

Comments
 (0)