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

fix(lambda-at-edge): serve HTML pages with no props (i.e static pages) properly on preview mode enabled #701

Merged
merged 2 commits into from
Oct 21, 2020

Conversation

dphang
Copy link
Collaborator

@dphang dphang commented Oct 21, 2020

  • When preview mode was enabled these HTML pages with no props were trying to be rendered via SSR but they don't exist in ssr.nonDynamic object in the build manifest. Hence the router was returning pages/404.html and then the handler was trying to require this, leading to a 503.

I don't have e2e tests for preview mode but we can add it in the near future.

@codecov
Copy link

codecov bot commented Oct 21, 2020

Codecov Report

Merging #701 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #701   +/-   ##
=======================================
  Coverage   80.18%   80.18%           
=======================================
  Files          54       54           
  Lines        1731     1731           
  Branches      366      366           
=======================================
  Hits         1388     1388           
  Misses        285      285           
  Partials       58       58           
Impacted Files Coverage Δ
...ackages/libs/lambda-at-edge/src/default-handler.ts 95.31% <100.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 06d4edb...851f85e. Read the comment docs.

@dphang dphang requested a review from thchia October 21, 2020 08:58
@dphang dphang merged commit 57cd668 into master Oct 21, 2020
@dphang dphang deleted the dphang/fix-preview-mode-on-html-pages branch October 23, 2020 03:23
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.

1 participant