Create a functions folder
Create a sub folder with a function and a
package.jsonfile with its dependancies
The function (right now) needs to have the same name as the folder that contains it.
/functions /one one.js <-- function code package.json <-- function dependencies
Configure your build directory for functions in netlify.toml
# netlify.toml file [build] command = "npm run build" publish = "build" # <-- Frontend build dir functions = "functions-build" # <-- Functions build dir
During your build, Zip up the function and dependancies and place in functions dist folder
We are working on streamlining the zips based function flow with a single CLI command!