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

fix(core): fix renderPageToHtml for work for all next.js versions #1611

Merged
merged 9 commits into from
Aug 31, 2021

Conversation

dphang
Copy link
Collaborator

@dphang dphang commented Aug 31, 2021

  • Try to check if html is a string or not (and call latest resultToString if the latter), if it fails then use the page's renderReqToHtml (without renderMode) which should work as a fallback.

@slsnextbot
Copy link
Collaborator

slsnextbot commented Aug 31, 2021

Handler Size Report

There are changes to handler sizes. Please review.

Base Handler Sizes (kB) (commit 934675b)

{
    "Lambda@Edge": {
        "Default Lambda": {
            "Standard": 1239,
            "Minified": 440
        },
        "API Lambda": {
            "Standard": 91,
            "Minified": 37
        },
        "Image Lambda": {
            "Standard": 906,
            "Minified": 360
        },
        "Regeneration Lambda": {
            "Standard": 634,
            "Minified": 227
        }
    }
}

New Handler Sizes (kB) (commit 27ffbdc)

{
    "Lambda@Edge": {
        "Default Lambda": {
            "Standard": 1248,
            "Minified": 447
        },
        "API Lambda": {
            "Standard": 99,
            "Minified": 44
        },
        "Image Lambda": {
            "Standard": 914,
            "Minified": 367
        },
        "Regeneration Lambda": {
            "Standard": 642,
            "Minified": 234
        }
    }
}

@codecov
Copy link

codecov bot commented Aug 31, 2021

Codecov Report

Merging #1611 (27ffbdc) into master (214f8a2) will decrease coverage by 0.04%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1611      +/-   ##
==========================================
- Coverage   84.34%   84.29%   -0.05%     
==========================================
  Files          98       98              
  Lines        3437     3439       +2     
  Branches     1020     1020              
==========================================
  Hits         2899     2899              
- Misses        478      480       +2     
  Partials       60       60              
Impacted Files Coverage Δ
packages/libs/core/src/utils/renderUtils.ts 80.00% <66.66%> (-20.00%) ⬇️

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 214f8a2...27ffbdc. Read the comment docs.

@dphang dphang changed the title fix(core): call resultToChunks() in renderPageToHtml only when htmlRe… fix(core): fix renderPageToHtml for work for all next.js versions Aug 31, 2021
@dphang dphang mentioned this pull request Aug 31, 2021
@dphang dphang merged commit d3a10b2 into master Aug 31, 2021
@delete-merged-branch delete-merged-branch bot deleted the dphang/fix-renderhtml branch August 31, 2021 20:29
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