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

feat(nextjs-component): experimental - allow serving API pages from d… #1632

Merged
merged 7 commits into from
Sep 14, 2021

Conversation

dphang
Copy link
Collaborator

@dphang dphang commented Sep 3, 2021

…efault lambda

  • With newer Next.js versions, chunking of code is improved/smaller so now it's easier to serve all types of pages/APIs from the same Lambda.
  • TODO: support cross-page rewrites

@slsnextbot
Copy link
Collaborator

slsnextbot commented Sep 3, 2021

Handler Size Report

There are changes to handler sizes. Please review.

Base Handler Sizes (kB) (commit 801c391)

{
    "Lambda@Edge": {
        "Default Lambda": {
            "Standard": 1268,
            "Minified": 452
        },
        "API Lambda": {
            "Standard": 100,
            "Minified": 44
        },
        "Image Lambda": {
            "Standard": 933,
            "Minified": 371
        },
        "Regeneration Lambda": {
            "Standard": 655,
            "Minified": 237
        }
    }
}

New Handler Sizes (kB) (commit f9486c8)

{
    "Lambda@Edge": {
        "Default Lambda": {
            "Standard": 1271,
            "Minified": 453
        },
        "API Lambda": {
            "Standard": 100,
            "Minified": 44
        },
        "Image Lambda": {
            "Standard": 933,
            "Minified": 371
        },
        "Regeneration Lambda": {
            "Standard": 655,
            "Minified": 237
        }
    }
}

@codecov
Copy link

codecov bot commented Sep 3, 2021

Codecov Report

Merging #1632 (69160b9) into master (801c391) will decrease coverage by 0.28%.
The diff coverage is 56.25%.

❗ Current head 69160b9 differs from pull request most recent head f9486c8. Consider uploading reports for the commit f9486c8 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1632      +/-   ##
==========================================
- Coverage   84.15%   83.86%   -0.29%     
==========================================
  Files          98       98              
  Lines        3452     3477      +25     
  Branches     1028     1045      +17     
==========================================
+ Hits         2905     2916      +11     
- Misses        485      499      +14     
  Partials       62       62              
Impacted Files Coverage Δ
...ackages/libs/lambda-at-edge/src/default-handler.ts 86.03% <25.00%> (-2.86%) ⬇️
...rless-components/nextjs-component/src/component.ts 85.46% <63.15%> (-1.81%) ⬇️
packages/libs/lambda-at-edge/src/build.ts 96.28% <80.00%> (-0.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 801c391...f9486c8. Read the comment docs.

@dphang dphang marked this pull request as draft September 3, 2021 06:59
@dphang dphang marked this pull request as ready for review September 14, 2021 21:20
@dphang dphang merged commit b7fe7a9 into master Sep 14, 2021
@delete-merged-branch delete-merged-branch bot deleted the dphang/api-lambda branch September 14, 2021 22:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants