@@ -404,19 +404,19 @@ const baseServerReplacements: Array<[string, string]> = [
404
404
const nextServerReplacements : Array < [ string , string ] > = [
405
405
[
406
406
`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;` ,
408
408
] ,
409
409
[
410
410
`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 [];` ,
412
412
] ,
413
413
[
414
414
`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;` ,
416
416
] ,
417
417
[
418
418
`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')) {` ,
420
420
] ,
421
421
]
422
422
0 commit comments