Hattip 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:
import netlifyEdgeAdapter from "@hattip/adapter-netlify-edge";
import handler from "./handler.js";
export default netlifyEdgeAdapter(handler);
interface NetlifyEdgePlatformInfo {
/** Platform name */
name: "netlify-edge";
/** Netlify-specific context object */
context: NetlifyContext;
}
See Netlify's documentation for the Netlify-specific context object.