@@ -404,19 +404,19 @@ const baseServerReplacements: Array<[string, string]> = [
404404const nextServerReplacements : Array < [ string , string ] > = [
405405 [
406406 `getMiddlewareManifest() {\n if (this.minimalMode) return null;` ,
407- `getMiddlewareManifest() {\n if (this.minimalMode || (process.env.NEXT_DISABLE_NETLIFY_EDGE !== 'true' && process.env.NEXT_DISABLE_NETLIFY_EDGE !== '1')) return null;` ,
407+ `getMiddlewareManifest() {\n if (this.minimalMode || (process.env.NETLIFY && process.env. NEXT_DISABLE_NETLIFY_EDGE !== 'true' && process.env.NEXT_DISABLE_NETLIFY_EDGE !== '1')) return null;` ,
408408 ] ,
409409 [
410410 `generateCatchAllMiddlewareRoute(devReady) {\n if (this.minimalMode) return []` ,
411- `generateCatchAllMiddlewareRoute(devReady) {\n if (this.minimalMode || (process.env.NEXT_DISABLE_NETLIFY_EDGE !== 'true' && process.env.NEXT_DISABLE_NETLIFY_EDGE !== '1')) return [];` ,
411+ `generateCatchAllMiddlewareRoute(devReady) {\n if (this.minimalMode || (process.env.NETLIFY && process.env. NEXT_DISABLE_NETLIFY_EDGE !== 'true' && process.env.NEXT_DISABLE_NETLIFY_EDGE !== '1')) return [];` ,
412412 ] ,
413413 [
414414 `generateCatchAllMiddlewareRoute() {\n if (this.minimalMode) return undefined;` ,
415- `generateCatchAllMiddlewareRoute() {\n if (this.minimalMode || (process.env.NEXT_DISABLE_NETLIFY_EDGE !== 'true' && process.env.NEXT_DISABLE_NETLIFY_EDGE !== '1')) return undefined;` ,
415+ `generateCatchAllMiddlewareRoute() {\n if (this.minimalMode || (process.env.NETLIFY && process.env. NEXT_DISABLE_NETLIFY_EDGE !== 'true' && process.env.NEXT_DISABLE_NETLIFY_EDGE !== '1')) return undefined;` ,
416416 ] ,
417417 [
418418 `getMiddlewareManifest() {\n if (this.minimalMode) {` ,
419- `getMiddlewareManifest() {\n if (!this.minimalMode && (process.env.NEXT_DISABLE_NETLIFY_EDGE === 'true' || process.env.NEXT_DISABLE_NETLIFY_EDGE === '1')) {` ,
419+ `getMiddlewareManifest() {\n if (!this.minimalMode && (process.env.NETLIFY && process.env. NEXT_DISABLE_NETLIFY_EDGE === 'true' || process.env.NEXT_DISABLE_NETLIFY_EDGE === '1')) {` ,
420420 ] ,
421421]
422422
0 commit comments