Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Experimental Next.js 12 Output File Tracing #2169

Merged
merged 4 commits into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
node_modules
/coverage.data
/coverage/
junit.xml
examples/basic-next-serverless-app/build
.serverless
.next
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ The fourth cache behaviour handles next API requests `api/*`.
| build.cleanupDotNext | `boolean` | `true` | Whether to clean up `.next` directory before running the build step |
| build.assetIgnorePatterns | `string[]` | `[]` | Glob patterns to ignore when discovering files to copy from _next/static, public, static directories. |
| build.useV2Handler | `boolean` | `false` | **Experimental** Set this to true to use V2 handlers which starts to use genericized handlers. Note: this has the functionality of `separateApiLambda` and `disableOriginResponseHandler` so it should not be used together. Also, it is not completely optimized yet in terms of code size, but should still be performant. In the future, we will likely use this mode by default. |
| build.outputFileTracing |`boolean` |`false` | **Experimental** Use the Next.js 12 [Output File Tracing](https://nextjs.org/docs/advanced-features/output-file-tracing) for copying required files into the Lambdas. This option doesn't set any `target` and instead relies on the default value, because `target` is now deprecated. |
| cloudfront | `object` | `{}` | Inputs to be passed to [aws-cloudfront](https://github.com/serverless-components/aws-cloudfront) |
| certificateArn | `string` | `` | Specific certificate ARN to use for CloudFront distribution. Helpful if you have a wildcard SSL cert you wish to use. This currently works only in tandem with the`domain`input. Please check [custom CloudFront configuration](https://github.com/serverless-nextjs/serverless-next.js#custom-cloudfront-configuration) for how to specify`certificate`without needing to use the`domain`input (note that doing so will override any certificate due to the domain input). |
| domainType |`string` |`"both"` | Can be one of:`"apex"`- apex domain only, don't create a www subdomain.`"www"` - www domain only, don't create an apex subdomain.`"both"`- create both www and apex domains when either one is provided. |
Expand Down
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ module.exports = {
"/e2e-tests/",
"/tests/",
"/scripts/",
".test_sls_next_output",
"__tests__",
"babel.config.js",
"jest.config.js",
"<rootDir>/packages/serverless-components/aws-s3",
Expand Down
1 change: 0 additions & 1 deletion packages/e2e-tests/next-app-experimental/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/next-app-experimental/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"homepage": "https://github.com/serverless-next.js/serverless-next.js",
"dependencies": {
"isomorphic-fetch": "3.0.0",
"next": "11.1.3",
"next": "12.0.8",
"react": "17.0.2",
"react-dom": "17.0.2"
},
Expand Down
1 change: 1 addition & 0 deletions packages/e2e-tests/next-app-experimental/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ next-app-experimental:
foo: bar
build:
useV2Handler: true
outputFileTracing: true
#separateApiLambda: false
#disableOriginResponseHandler: true
postBuildCommands: ["node scripts/post-build-test.js"]
Expand Down
3 changes: 2 additions & 1 deletion packages/e2e-tests/next-app-experimental/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"baseUrl": "src"
"baseUrl": "src",
"incremental": true
},
"exclude": [
"node_modules",
Expand Down
Loading