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