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) {
6262
6363 const { appBuildOutputPath, outputDir } = options ;
6464 const packagePath = buildHelper . getPackagePath ( options ) ;
65- const buildId = buildHelper . getBuildId ( appBuildOutputPath ) ;
65+ const buildId = buildHelper . getBuildId ( options ) ;
6666 let useTagCache = false ;
6767
6868 // 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) {
292292 const patterns = "patterns" in value ? value . patterns : [ "*" ] ;
293293 patterns . forEach ( ( pattern ) => {
294294 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 ) ) ) ,
298296 origin : value . placement === "global" ? undefined : key ,
299297 edgeFunction :
300298 value . placement === "global"
Original file line number Diff line number Diff line change @@ -252,9 +252,12 @@ export function getHtmlPages(dotNextPath: string) {
252252 . reduce ( ( acc , page ) => acc . add ( page ) , new Set < string > ( ) ) ;
253253}
254254
255- export function getBuildId ( dotNextPath : string ) {
255+ export function getBuildId ( options : BuildOptions ) {
256256 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+ )
258261 . trim ( ) ;
259262}
260263
You can’t perform that action at this time.
0 commit comments