File tree 1 file changed +6
-1
lines changed
packages/runtime/src/helpers
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 (
35
35
const publishDir = relative ( functionDir , publish )
36
36
37
37
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
+
38
43
const apiHandlerSource = await getApiHandler ( {
39
44
page : route ,
40
45
config,
@@ -210,7 +215,7 @@ export const warnOnApiRoutes = async ({
210
215
if ( functions . some ( ( func ) => func . schedule ) ) {
211
216
console . warn (
212
217
outdent `
213
- ${ chalk . yellowBright `Using scheduled API routes` }
218
+ ${ chalk . yellowBright `Using scheduled API routes` }
214
219
These are run on a schedule when deployed to production.
215
220
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.
216
221
` ,
You can’t perform that action at this time.
0 commit comments