File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
packages/open-next/src/core Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,7 @@ export async function createGenericHandler<
35
35
E extends BaseEventOrResult = InternalEvent ,
36
36
R extends BaseEventOrResult = InternalResult ,
37
37
> ( handler : GenericHandler < Type , E , R > ) {
38
- //First we load the config
39
- // @ts -expect-error
38
+ // @ts -expect-error `./open-next.config.mjs` exists only in the build output
40
39
const config : OpenNextConfig = await import ( "./open-next.config.mjs" ) . then (
41
40
( m ) => m . default ,
42
41
) ;
Original file line number Diff line number Diff line change @@ -30,10 +30,10 @@ declare global {
30
30
}
31
31
32
32
export async function createMainHandler ( ) {
33
- //First we load the config
34
- const config : OpenNextConfig = await import (
35
- process . cwd ( ) + "/open-next.config.mjs"
36
- ) . then ( ( m ) => m . default ) ;
33
+ // @ts -expect-error `./open-next.config.mjs` exists only in the build output
34
+ const config : OpenNextConfig = await import ( "./open-next.config.mjs" ) . then (
35
+ ( m ) => m . default ,
36
+ ) ;
37
37
38
38
const thisFunction = globalThis . fnName
39
39
? config . functions ! [ globalThis . fnName ]
You can’t perform that action at this time.
0 commit comments