You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 1, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+31-4
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ And includes CLI and custom server handler to integrate with ApiGw.
6
6
7
7
-[NextJS Lambda Utils](#nextjs-lambda-utils)
8
8
-[Usage](#usage)
9
+
-[next.config.js](#nextconfigjs)
9
10
-[Server handler](#server-handler)
10
11
-[Image handler](#image-handler)
11
12
-[CDK](#cdk)
@@ -14,6 +15,7 @@ And includes CLI and custom server handler to integrate with ApiGw.
14
15
-[Server handler](#server-handler-1)
15
16
-[Static assets](#static-assets)
16
17
-[TODO](#todo)
18
+
-[Disclaimer](#disclaimer)
17
19
18
20
## Usage
19
21
@@ -23,6 +25,19 @@ This division makes it easier to control resources and specify sizes and timeout
23
25
24
26
Loading of assets and static content is handled via Cloudfront and S3 origin, so there is no need for specifying this behaviour in Lambda or handling it anyhow.
25
27
28
+
### next.config.js
29
+
30
+
The only requirement is to change your Next12 config to produce standalone output via `output: 'standalone'`.
31
+
This should work fine for single-repositories with yarn/npm/pnpm.
32
+
33
+
In case you are using monorepo/workspaces, be aware! Producing standalone build is tricky due to dependencies being spread out and not contained within single `node_modules` folder, making it complicated for `SWC` to properly produce required dependencies. This would most likely result in deployment failing with HTTP 500, internal error, as some required dependency is not in place.
0 commit comments