File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
packages/open-next/src/build Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export function createCacheAssets(options: buildHelper.BuildOptions) {
62
62
63
63
const { appBuildOutputPath, outputDir } = options ;
64
64
const packagePath = buildHelper . getPackagePath ( options ) ;
65
- const buildId = buildHelper . getBuildId ( appBuildOutputPath ) ;
65
+ const buildId = buildHelper . getBuildId ( options ) ;
66
66
let useTagCache = false ;
67
67
68
68
// Copy pages to cache folder
Original file line number Diff line number Diff line change @@ -292,9 +292,7 @@ export async function generateOutput(options: BuildOptions) {
292
292
const patterns = "patterns" in value ? value . patterns : [ "*" ] ;
293
293
patterns . forEach ( ( pattern ) => {
294
294
behaviors . push ( {
295
- pattern : prefixer (
296
- pattern . replace ( / B U I L D _ I D / , getBuildId ( appBuildOutputPath ) ) ,
297
- ) ,
295
+ pattern : prefixer ( pattern . replace ( / B U I L D _ I D / , getBuildId ( options ) ) ) ,
298
296
origin : value . placement === "global" ? undefined : key ,
299
297
edgeFunction :
300
298
value . placement === "global"
Original file line number Diff line number Diff line change @@ -252,9 +252,12 @@ export function getHtmlPages(dotNextPath: string) {
252
252
. reduce ( ( acc , page ) => acc . add ( page ) , new Set < string > ( ) ) ;
253
253
}
254
254
255
- export function getBuildId ( dotNextPath : string ) {
255
+ export function getBuildId ( options : BuildOptions ) {
256
256
return fs
257
- . readFileSync ( path . join ( dotNextPath , ".next/BUILD_ID" ) , "utf-8" )
257
+ . readFileSync (
258
+ path . join ( options . appBuildOutputPath , ".next/BUILD_ID" ) ,
259
+ "utf-8" ,
260
+ )
258
261
. trim ( ) ;
259
262
}
260
263
You can’t perform that action at this time.
0 commit comments