@@ -152,7 +152,7 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
152152
153153 fs . writeFileSync ( openNextServerBundle + ".meta.json" , JSON . stringify ( result . metafile , null , 2 ) ) ;
154154
155- await updateWorkerBundledCode ( openNextServerBundle , buildOpts ) ;
155+ await updateWorkerBundledCode ( openNextServerBundle ) ;
156156
157157 const isMonorepo = monorepoRoot !== appPath ;
158158 if ( isMonorepo ) {
@@ -170,16 +170,11 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
170170/**
171171 * This function applies patches required for the code to run on workers.
172172 */
173- export async function updateWorkerBundledCode (
174- workerOutputFile : string ,
175- buildOpts : BuildOptions
176- ) : Promise < void > {
173+ export async function updateWorkerBundledCode ( workerOutputFile : string ) : Promise < void > {
177174 const code = await readFile ( workerOutputFile , "utf8" ) ;
178175
179176 const patchedCode = await patchCodeWithValidations ( code , [
180177 [ "require" , patches . patchRequire ] ,
181- [ "cacheHandler" , ( code ) => patches . patchCache ( code , buildOpts ) ] ,
182- [ "composableCache" , ( code ) => patches . patchComposableCache ( code , buildOpts ) , { isOptional : true } ] ,
183178 [
184179 "`require.resolve` call" ,
185180 // workers do not support dynamic require nor require.resolve
0 commit comments