Netlify Edge Functions adapter for Hattip
npm install @hattip/adapter-netlify-edge@hattip/adapter-netlify-edgeHattip adapter for Netlify Edge Functions.
Assuming you have your Hattip handler defined in handler.js, create an entry file like the following and use @hattip/bundler-netlify or your favorite bundler to bundle it:
``js
import netlifyEdgeAdapter from "@hattip/adapter-netlify-edge";
import handler from "./handler.js";
export default netlifyEdgeAdapter(handler);
`
`ts``
interface NetlifyEdgePlatformInfo {
/* Platform name /
name: "netlify-edge";
/* Netlify-specific context object /
context: NetlifyContext;
}
See Netlify's documentation for the Netlify-specific context object.