Upcoming change: `netlify/functions` as zero-config default folder for deploying Netlify Functions

Currently, in order to start using Netlify Functions on a site, you need to designate a folder in your site repository where we can find and deploy your functions.

Starting in February 2021, we will be implementing a default functions folder at the following path:

SITE_BASE_DIRECTORY/netlify/functions

This means that if you save your serverless functions in that folder path, we’ll deploy them automatically with no configuration required. It also means that Build Plugins will be able to add functions to sites that don’t already have a designated functions folder.

If you already have a designated folder configured, or you configure one in the future, we’ll use that path instead of the default.

If you have a netlify/functions folder in your site’s base directory you may experience build failures starting in February unless you make one of the following changes:

  • (Recommended) Change the name of the netlify folder, or nest it in another folder, or
  • Designate a custom functions folder path to override the default value. Be aware that we may use other netlify/ subfolders for other feature defaults in the future, so this may not be a long-term solution.

If you have a netlify folder in your site’s base directory, without a functions subfolder, the current upcoming change will not impact your build. However, we recommend you change the name of the folder, or nest it inside another folder, to avoid potential issues with other feature defaults we may implement in the future.

For both cases described above, we will start printing a warning message in the deploy logs in January. When the full feature change is deployed in February 2021, we will post a reply in this topic, and update the log messaging.

If you have any questions about this change and how it may affect your site, feel free to post them here!

3 Likes

This feature is now released! You can check out the announcement here:

1 Like