Skip to content

Commit

Permalink
fix passing cacheHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Jan 17, 2024
1 parent 54741ff commit 4c6d4c5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
6 changes: 3 additions & 3 deletions packages/next/src/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1260,9 +1260,9 @@ export default async function build(
compress: false,
}
: {}),
// cacheHandler: cacheHandler
// ? path.relative(distDir, cacheHandler)
// : undefined,
cacheHandler: cacheHandler
? path.relative(distDir, cacheHandler)
: config.cacheHandler,
experimental: {
...config.experimental,
trustHostHeader: ciEnvironment.hasNextSupport,
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/build/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1304,8 +1304,8 @@ export async function buildAppStaticPaths({
configFileName,
generateParams,
isrFlushToDisk,
requestHeaders,
cacheHandler,
requestHeaders,
maxMemoryCacheSize,
fetchCacheKeyPrefix,
ppr,
Expand Down
6 changes: 0 additions & 6 deletions packages/next/src/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,6 @@ function assignDefaults(
)
}

const distDir = config.distDir || defaultConfig.distDir
const userCacheHandler = config.cacheHandler
if (userCacheHandler) {
config.cacheHandler = relative(distDir, userCacheHandler)
}

const result = { ...defaultConfig, ...config }

if (
Expand Down

0 comments on commit 4c6d4c5

Please sign in to comment.