Skip to content

Commit 5b6d8d8

Browse files
committed
added some comment
1 parent d71afec commit 5b6d8d8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/open-next/src/build/patch/patches/patchEnvVar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { createPatchCode } from "../astCodePatcher.js";
22
import type { CodePatcher } from "../codePatcher";
33

44
/**
5-
* This function create an ast-grep rule to replace specific env var inside an if.
5+
* Creates a rule to replace `process.env.${envVar}` by `value` in the condition of if statements
66
* This is used to avoid loading unnecessary deps at runtime
77
* @param envVar The env var that we want to replace
88
* @param value The value that we want to replace it with

packages/open-next/src/types/open-next.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,11 @@ export interface ResolvedRoute {
120120

121121
/**
122122
* The route preloading behavior. Only supported in Next 15+.
123-
* - "none" - No preloading of the route at all
124-
* - "withWaitUntil" - Preload the route using the waitUntil provided by the wrapper - If not supported, it will fallback to "none"
123+
* Default behavior of Next is disabled. You should do your own testing to choose which one suits you best
124+
* - "none" - No preloading of the route at all. This is the default
125+
* - "withWaitUntil" - Preload the route using the waitUntil provided by the wrapper - If not supported, it will fallback to "none". At the moment only cloudflare wrappers provide a `waitUntil`
125126
* - "onWarmerEvent" - Preload the route on the warmer event - Needs to be implemented by the wrapper. Only supported in `aws-lambda-streaming` wrapper for now
126-
* - "onStart" - Preload the route before even invoking the wrapper - This is a blocking operation. The handler will only be created after all the routes have been loaded, it may increase the cold start time by a lot in some cases.
127+
* - "onStart" - Preload the route before even invoking the wrapper - This is a blocking operation. The handler will only be created after all the routes have been loaded, it may increase the cold start time by a lot in some cases. Useful for long running server or in serverless with some careful testing
127128
* @default "none"
128129
*/
129130
export type RoutePreloadingBehavior =

0 commit comments

Comments
 (0)