@@ -154,7 +154,7 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
154154
155155 fs . writeFileSync ( openNextServerBundle + ".meta.json" , JSON . stringify ( result . metafile , null , 2 ) ) ;
156156
157- await updateWorkerBundledCode ( openNextServerBundle , buildOpts ) ;
157+ await updateWorkerBundledCode ( openNextServerBundle ) ;
158158
159159 const isMonorepo = monorepoRoot !== appPath ;
160160 if ( isMonorepo ) {
@@ -172,16 +172,11 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
172172/**
173173 * This function applies patches required for the code to run on workers.
174174 */
175- export async function updateWorkerBundledCode (
176- workerOutputFile : string ,
177- buildOpts : BuildOptions
178- ) : Promise < void > {
175+ export async function updateWorkerBundledCode ( workerOutputFile : string ) : Promise < void > {
179176 const code = await readFile ( workerOutputFile , "utf8" ) ;
180177
181178 const patchedCode = await patchCodeWithValidations ( code , [
182179 [ "require" , patches . patchRequire ] ,
183- [ "cacheHandler" , ( code ) => patches . patchCache ( code , buildOpts ) ] ,
184- [ "composableCache" , ( code ) => patches . patchComposableCache ( code , buildOpts ) , { isOptional : true } ] ,
185180 [
186181 "`require.resolve` call" ,
187182 // workers do not support dynamic require nor require.resolve
0 commit comments