File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/runtime/src/helpers Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ export const generateFunctions = async (
3535 const publishDir = relative ( functionDir , publish )
3636
3737 for ( const { route, config, compiled } of apiRoutes ) {
38+ if ( config . type === undefined ) {
39+ // We're not generating a function for this route because it's not a background or scheduled function.
40+ continue
41+ }
42+
3843 const apiHandlerSource = await getApiHandler ( {
3944 page : route ,
4045 config,
@@ -210,7 +215,7 @@ export const warnOnApiRoutes = async ({
210215 if ( functions . some ( ( func ) => func . schedule ) ) {
211216 console . warn (
212217 outdent `
213- ${ chalk . yellowBright `Using scheduled API routes` }
218+ ${ chalk . yellowBright `Using scheduled API routes` }
214219 These are run on a schedule when deployed to production.
215220 You can test them locally by loading them in your browser but this will not be available when deployed, and any returned value is ignored.
216221 ` ,
You can’t perform that action at this time.
0 commit comments