Skip to content

Commit 11f4ef1

Browse files
fix: update patch syntax (#1480)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 4865dba commit 11f4ef1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

plugin/src/helpers/files.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -331,13 +331,21 @@ const baseServerReplacements: Array<[string, string]> = [
331331

332332
const nextServerReplacements: Array<[string, string]> = [
333333
[
334-
`getMiddlewareManifest() {\n if (!this.minimalMode) {`,
335-
`getMiddlewareManifest() {\n if (!this.minimalMode && !process.env.NEXT_USE_NETLIFY_EDGE) {`,
334+
`getMiddlewareManifest() {\n if (this.minimalMode) return null;`,
335+
`getMiddlewareManifest() {\n if (this.minimalMode || process.env.NEXT_USE_NETLIFY_EDGE) return null;`,
336+
],
337+
[
338+
`generateCatchAllMiddlewareRoute(devReady) {\n if (this.minimalMode) return []`,
339+
`generateCatchAllMiddlewareRoute(devReady) {\n if (this.minimalMode || process.env.NEXT_USE_NETLIFY_EDGE) return [];`,
336340
],
337341
[
338342
`generateCatchAllMiddlewareRoute() {\n if (this.minimalMode) return undefined;`,
339343
`generateCatchAllMiddlewareRoute() {\n if (this.minimalMode || process.env.NEXT_USE_NETLIFY_EDGE) return undefined;`,
340344
],
345+
[
346+
`getMiddlewareManifest() {\n if (this.minimalMode) {`,
347+
`getMiddlewareManifest() {\n if (!this.minimalMode && !process.env.NEXT_USE_NETLIFY_EDGE) {`,
348+
],
341349
]
342350

343351
export const patchNextFiles = async (root: string): Promise<void> => {

0 commit comments

Comments
 (0)