Currently, if you’re deploying a site via Netlify’s continuous deployment, you must have a build command specified if you want to deploy Netlify Functions with your site. On November 9, we’re planning to remove this requirement.
This means you will be able to specify a functions folder in the UI or Netlify configuration file, commit your function files to it, and git push
to deploy them automatically, even if your site doesn’t require a build step.
Many customers have asked for this! So why are we telling you about it and not just deploying the change? Because one of our guiding principles is that we avoid changing the behavior of existing builds when we can, and we give advance notice when it can’t be avoided. In this case, there are two tiny edge cases where behavior would change:
- If you have specified a functions folder and have saved functions inside of it, but you have no intention of deploying those functions. Without a build command, those functions don’t currently deploy when you deploy your site, but after November 9, they will.
- If you have specified a functions folder (with or without any functions in it), and you have a
package.json
file. Without a build command, we don’t currently runnpm install
during your site deploys, but after November 9, we will.
If you have a functions folder specified but you don’t want automatic dependency installs or functions deployment, we recommend removing the functions folder setting from your site settings and/or Netlify configuration file.
Otherwise, look forward to easier functions deployment on sites that don’t require build commands! We’ll post another update when we release this feature on November 9.