File tree Expand file tree Collapse file tree 4 files changed +10
-14
lines changed Expand file tree Collapse file tree 4 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,8 @@ command = "npm run build"
3
3
publish = " .next"
4
4
ignore = " if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
5
5
6
- [build .environment ]
7
- NEXT_USE_NETLIFY_EDGE = " true"
8
-
9
6
[[plugins ]]
10
- package = " .. /plugin-wrapper/ "
7
+ package = " @netlify /plugin-nextjs "
11
8
12
9
# This is a fake plugin, that makes it run npm install
13
10
[[plugins ]]
Original file line number Diff line number Diff line change @@ -211,8 +211,6 @@ export const writeEdgeFunctions = async (netlifyConfig: NetlifyConfig) => {
211
211
export const enableEdgeInNextConfig = async ( publish : string ) => {
212
212
const configFile = join ( publish , 'required-server-files.json' )
213
213
const config = await readJSON ( configFile )
214
- // This is for runtime in Next.js, rather than a build plugin setting
215
- config . config . env . NEXT_USE_NETLIFY_EDGE = 'true'
216
214
await writeJSON ( configFile , config )
217
215
}
218
216
/* eslint-enable max-lines */
Original file line number Diff line number Diff line change @@ -340,19 +340,19 @@ const baseServerReplacements: Array<[string, string]> = [
340
340
const nextServerReplacements : Array < [ string , string ] > = [
341
341
[
342
342
`getMiddlewareManifest() {\n if (this.minimalMode) return null;` ,
343
- `getMiddlewareManifest() {\n if (this.minimalMode || process.env.NEXT_USE_NETLIFY_EDGE ) return null;` ,
343
+ `getMiddlewareManifest() {\n if (this.minimalMode || ! process.env.NEXT_DISABLE_NETLIFY_EDGE ) return null;` ,
344
344
] ,
345
345
[
346
346
`generateCatchAllMiddlewareRoute(devReady) {\n if (this.minimalMode) return []` ,
347
- `generateCatchAllMiddlewareRoute(devReady) {\n if (this.minimalMode || process.env.NEXT_USE_NETLIFY_EDGE ) return [];` ,
347
+ `generateCatchAllMiddlewareRoute(devReady) {\n if (this.minimalMode || ! process.env.NEXT_DISABLE_NETLIFY_EDGE ) return [];` ,
348
348
] ,
349
349
[
350
350
`generateCatchAllMiddlewareRoute() {\n if (this.minimalMode) return undefined;` ,
351
- `generateCatchAllMiddlewareRoute() {\n if (this.minimalMode || process.env.NEXT_USE_NETLIFY_EDGE ) return undefined;` ,
351
+ `generateCatchAllMiddlewareRoute() {\n if (this.minimalMode || ! process.env.NEXT_DISABLE_NETLIFY_EDGE ) return undefined;` ,
352
352
] ,
353
353
[
354
354
`getMiddlewareManifest() {\n if (this.minimalMode) {` ,
355
- `getMiddlewareManifest() {\n if (!this.minimalMode && ! process.env.NEXT_USE_NETLIFY_EDGE ) {` ,
355
+ `getMiddlewareManifest() {\n if (!this.minimalMode && process.env.NEXT_DISABLE_NETLIFY_EDGE ) {` ,
356
356
] ,
357
357
]
358
358
Original file line number Diff line number Diff line change @@ -89,10 +89,11 @@ const exists = async (relativePath: string) => {
89
89
}
90
90
91
91
const handler = async ( req : Request , context : Context ) => {
92
- if ( ! Deno . env . get ( 'NETLIFY_DEV' ) ) {
93
- // Only run in dev
94
- return
95
- }
92
+ // Uncomment when CLI update lands
93
+ // if (!Deno.env.get('NETLIFY_DEV')) {
94
+ // // Only run in dev
95
+ // return
96
+ // }
96
97
97
98
let middleware
98
99
// Dynamic imports and FS operations aren't allowed when deployed,
You can’t perform that action at this time.
0 commit comments