Skip to content

Use shared helpers for generated functions #352

@ascorbic

Description

@ascorbic

Rather than creating each function with lots of duplicated files, make the wrapper into an export which is imported from a shared lib. So rather than creating a directory like this:

image

...we have just the entry point file next_index.js and the nextPage directory. The entry point would be something like:

const functionHandler= require("netlify-plugin-netlify/functions")
const nextPage = require('./nextPage')

module.exports = functionHandler({ nextPage })

Metadata

Metadata

Assignees

Labels

type: chorework needed to keep the product and development running smoothly

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions