Skip to content

Commit 976c8a6

Browse files
authored
update assetPrefix (#442)
1 parent 1a0491d commit 976c8a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

next.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import path from 'path';
33

44
const isProd = process.env.NODE_ENV === 'production';
55
const basePath = isProd ? (process.env.BASE_PATH || '') : '';
6-
const targetFolder = process.env.TARGET_FOLDER || '';
7-
const assetPrefix = isProd && targetFolder !== '' ? './' : '';
6+
// const targetFolder = process.env.TARGET_FOLDER || '';
7+
const assetPrefix = isProd ? (basePath ? `${basePath.replace(/\/$/, '')}/` : './') : '';
88

99
/** @type {import('next').NextConfig} */
1010
const nextConfig = {

0 commit comments

Comments
 (0)