Skip to content

Commit a6a0079

Browse files
committed
chore: add edge handler todo
1 parent ecd9460 commit a6a0079

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/helpers/functions.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,10 @@ export const createServerHandler = async () => {
5757
`import handler from './dist/handlers/server.js';export default handler;export const config = {path:'/*'}`,
5858
)
5959
}
60+
61+
/**
62+
* Create a Netlify edge function to run the Next.js server
63+
*/
64+
export const createEdgeHandler = async () => {
65+
// TODO: implement
66+
}

src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { NetlifyPluginOptions } from '@netlify/build'
22

33
import { setBuildConfig } from './helpers/config.js'
4-
import { stashBuildOutput, publishStaticAssets, storePrerenderedContent } from './helpers/files.js'
5-
import { createServerHandler } from './helpers/functions.js'
4+
import { publishStaticAssets, stashBuildOutput, storePrerenderedContent } from './helpers/files.js'
5+
import { createEdgeHandler, createServerHandler } from './helpers/functions.js'
66

77
type NetlifyPluginOptionsWithFlags = NetlifyPluginOptions & {
88
featureFlags?: Record<string, unknown>
@@ -19,5 +19,6 @@ export const onBuild = async ({ constants }: NetlifyPluginOptionsWithFlags) => {
1919
publishStaticAssets(constants),
2020
storePrerenderedContent(),
2121
createServerHandler(),
22+
createEdgeHandler(),
2223
])
2324
}

0 commit comments

Comments
 (0)