Skip to content

Commit 82f1f85

Browse files
committed
Provide fallback for functions dir
1 parent f8d4988 commit 82f1f85

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ async function generateSSO({ config /* &mut */, functionsDir, publishDir }) {
8686
config.redirects = [...gatedRedirects, ...additionalRedirects]
8787
}
8888

89+
const DEFAULT_FUNCTIONS_SRC = 'netlify-automatic-functions'
90+
8991
module.exports = {
9092
// The plugin main logic uses `on...` event handlers that are triggered on
9193
// each new Netlify Build.
@@ -96,7 +98,7 @@ module.exports = {
9698
// Whole configuration file. For example, content of `netlify.toml`
9799
netlifyConfig,
98100
// Build constants
99-
constants: { PUBLISH_DIR, FUNCTIONS_SRC },
101+
constants: { PUBLISH_DIR, FUNCTIONS_SRC = DEFAULT_FUNCTIONS_SRC },
100102
}) {
101103
await generateSSO({
102104
config: netlifyConfig,

0 commit comments

Comments
 (0)