Which problem is this feature request solving?
plugins can add runtime funcitonality instead of just buildtime by generating functions.
its not very clear how to do this in userland. have to figure out which lifecycle, and which path, and how to zip. annoying, and a barrier.
Describe the solution you'd like
from @DavidWells
this is a good candidate for a utility function.
e.g.
await util.addFunction({
name: 'foo'
code: 'export.handler lololol'
})
To automagically do this stuff for u
After discussing this with @sw-yx on Slack, we came to the following conclusion: all that is needed is copying function files to the constants.FUNCTIONS_SRC directory before functions are handled by @netlify/plugin-functions-core.
await utils.functions.add('./path/to/function')
This should be an easy one to implement :)
Done at #644.
This is awesome! Thanks for thinking this through @sw-yx @DavidWells @ehmicky
@talves thanks man btw this is kinda what i was envisioning using it https://github.com/netlify-labs/netlify-plugin-search-index
Most helpful comment
@talves thanks man btw this is kinda what i was envisioning using it https://github.com/netlify-labs/netlify-plugin-search-index