Skip to content

Netlify edge function exporter #24

@mb21

Description

@mb21

See https://docs.netlify.com/build/edge-functions/overview/

The idea would be to add a package @mastrojs/netlify or similar that contains a script which would copy over all routes to netlify/edge-functions/ and append something like the following to each file:

export default GET;
export const config = { path: "/my-route-path" };

or

export default POST;
export const config = { path: "/my-route-path", method: "POST" };

see https://docs.netlify.com/build/edge-functions/declarations/#declare-edge-functions-in-netlify-toml

URLPattern expression. Must start with /, for example path = "/*"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions