mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This PR implements `edge-light` as a main field for bundling edge functions as defined in https://runtime-keys.proposal.wintercg.org Resolves EC-614 ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ---------
13 lines
338 B
JavaScript
13 lines
338 B
JavaScript
import edgeLightPackage from 'my-edge-light-package'
|
|
import edgeLightPackageExports from 'my-edge-light-package-exports'
|
|
import { NextResponse } from 'next/server'
|
|
|
|
export const config = { runtime: 'edge' }
|
|
|
|
export default function MyEdgeFunction() {
|
|
return NextResponse.json({
|
|
edgeLightPackage,
|
|
edgeLightPackageExports,
|
|
})
|
|
}
|