@@ -154,7 +154,7 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
154
154
155
155
fs . writeFileSync ( openNextServerBundle + ".meta.json" , JSON . stringify ( result . metafile , null , 2 ) ) ;
156
156
157
- await updateWorkerBundledCode ( openNextServerBundle , buildOpts ) ;
157
+ await updateWorkerBundledCode ( openNextServerBundle ) ;
158
158
159
159
const isMonorepo = monorepoRoot !== appPath ;
160
160
if ( isMonorepo ) {
@@ -172,16 +172,11 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
172
172
/**
173
173
* This function applies patches required for the code to run on workers.
174
174
*/
175
- export async function updateWorkerBundledCode (
176
- workerOutputFile : string ,
177
- buildOpts : BuildOptions
178
- ) : Promise < void > {
175
+ export async function updateWorkerBundledCode ( workerOutputFile : string ) : Promise < void > {
179
176
const code = await readFile ( workerOutputFile , "utf8" ) ;
180
177
181
178
const patchedCode = await patchCodeWithValidations ( code , [
182
179
[ "require" , patches . patchRequire ] ,
183
- [ "cacheHandler" , ( code ) => patches . patchCache ( code , buildOpts ) ] ,
184
- [ "composableCache" , ( code ) => patches . patchComposableCache ( code , buildOpts ) , { isOptional : true } ] ,
185
180
[
186
181
"`require.resolve` call" ,
187
182
// workers do not support dynamic require nor require.resolve
0 commit comments