Files
Gal SchlezingerandGitHub 282c1a0637 [edge] support edge-light exports when bundling edge functions (#45188)
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)

---------
2023-02-16 13:30:34 -08:00

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,
})
}