Skip to content

Commit 42da507

Browse files
committed
clearer routes in config
1 parent 5714615 commit 42da507

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/pages/v3/config.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,19 @@ const config = {
2323
},
2424
functions: { // here we define the functions that we want to deploy in a different server
2525
ssr: {
26-
routes: ["app/api/isr/route", "app/api/sse/route", "app/api/revalidateTag/route"], // For app dir, you need to include route|page, no need to include layout or loading
27-
patterns: ['api/*'], // patterns needs to be in a cloudfront compatible format, this will be used to generate the output
26+
routes: [
27+
"app/api/isr/route", "app/api/sse/route", "app/api/revalidateTag/route", // app dir Api routes
28+
"app/route1/page", "app/route2/page", // app dir pages
29+
"pages/route3" // page dir pages
30+
], // For app dir, you need to include route|page, no need to include layout or loading
31+
patterns: ['api/*', 'route1', 'route2', 'route3'], // patterns needs to be in a cloudfront compatible format, this will be used to generate the output
2832
override: {
2933
wrapper: "aws-lambda-streaming",
3034
},
3135
experimentalBundledNextServer: true // This enables the bundled next server which is faster and reduce the size of the server
3236
},
3337
pageSsr: {
34-
routes: ["pages/pageSsr"], // Routes should be in the form `pages/${route}` without the extension, it should match the filesystem
38+
routes: ["pages/pageSsr"], // For page dir routes should be in the form `pages/${route}` without the extension, it should match the filesystem
3539
patterns: [ 'pageSsr', "_next/data/BUILD_ID/pageSsr.json"],
3640
override: {
3741
wrapper: "node",

0 commit comments

Comments
 (0)