Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2cc81ca

Browse files
Set NextJS build to serverless
We must build our NextJS app as a serverless app. When we build, this creates a standalone .js function for each page. Our NextRouter Netlify function can then trigger that function when a user requests a certain page.
1 parent 264fd08 commit 2cc81ca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎next.config.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
// Target must be serverless
3+
target: 'serverless',
4+
// distDir already has .next as default
5+
distDir: '.next',
6+
};

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /