Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: detect loop in client error page #26567

Merged
merged 7 commits into from
Jul 1, 2021
Merged

fix: detect loop in client error page #26567

merged 7 commits into from
Jul 1, 2021

Conversation

huozhi
Copy link
Member

@huozhi huozhi commented Jun 24, 2021

Fixes #6973
Closes: #21217

Bug

  • Related issues linked using fixes #number
  • Integration tests added

Description

trying to display a fallback error page when there's error occurs in custom _error page on client side, to avoid infinite rerender with next internal _error page

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@huozhi huozhi marked this pull request as ready for review June 24, 2021 13:11
@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@huozhi huozhi marked this pull request as draft June 24, 2021 17:36
@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@huozhi huozhi marked this pull request as ready for review June 24, 2021 18:22
@ijjk

This comment has been minimized.

@huozhi huozhi marked this pull request as draft June 25, 2021 15:46
@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@huozhi huozhi marked this pull request as ready for review June 29, 2021 18:54
@huozhi huozhi requested a review from timneutkens June 29, 2021 18:54
@huozhi huozhi requested review from padmaia and styfle as code owners July 1, 2021 08:48
@ijjk ijjk added the created-by: Next.js team PRs by the Next.js team. label Jul 1, 2021
@ijjk

This comment has been minimized.

@ijjk
Copy link
Member

ijjk commented Jul 1, 2021

Failing test suites

Commit: 1cbf9c4

test/integration/font-optimization/test/index.test.js

  • Font Optimization > with-google > Font optimization for SSR apps > should minify the css
  • Font Optimization > with-google > Font optimization for emulated serverless apps > should minify the css
  • Font Optimization > with-google > Font optimization for serverless apps > should minify the css
Expand output

● Font Optimization › with-google › Font optimization for SSR apps › should minify the css

expect(received).toStrictEqual(expected) // deep equality

- Expected  - 1
+ Received  + 1

  Object {
    "https://fonts.googleapis.com/css2?family=Modak": "@font-face{font-family:'Modak';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/modak/v8/EJRYQgs1XtIEsnME.woff) format('woff')}@font-face{font-family:'Modak';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/modak/v8/EJRYQgs1XtIEskMB-hR77LKVTy8.woff2) format('woff2');unicode-range:U+0900-097F,U+1CD0-1CF6,U+1CF8-1CF9,U+200C-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FB}@font-face{font-family:'Modak';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/modak/v8/EJRYQgs1XtIEskMO-hR77LKVTy8.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Modak';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/modak/v8/EJRYQgs1XtIEskMA-hR77LKV.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
    "https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&display=swap": "@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Me5g.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlvAA.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtvAA.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCRc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfABc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCBc4AMP6lbBP.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfBxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfCRc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfABc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfCBc4AMP6lbBP.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfBxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfCxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfChc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfBBc4AMP6lQ.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
    "https://fonts.googleapis.com/css2?family=Roboto:wght@700": "@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlvAA.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCRc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfABc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCBc4AMP6lbBP.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfBxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
-   "https://fonts.googleapis.com/css?family=Voces": "@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v12/-F6_fjJyLyU8d7PGDmk.woff) format('woff')}@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v12/-F6_fjJyLyU8d7PIDm_6pClI_ik.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v12/-F6_fjJyLyU8d7PGDm_6pClI.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
+   "https://fonts.googleapis.com/css?family=Voces": "@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v15/-F6_fjJyLyU8d7PGDmk.woff) format('woff')}@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v15/-F6_fjJyLyU8d7PIDm_6pClI_ik.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v15/-F6_fjJyLyU8d7PGDm_6pClI.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
  }

  220 |           })
  221 |
> 222 |           expect(testCss).toStrictEqual(snapshotCss)
      |                           ^
  223 |         })
  224 |
  225 |         // Re-run build to check if it works when build is cached

  at Object.<anonymous> (integration/font-optimization/test/index.test.js:222:27)

● Font Optimization › with-google › Font optimization for serverless apps › should minify the css

expect(received).toStrictEqual(expected) // deep equality

- Expected  - 1
+ Received  + 1

  Object {
    "https://fonts.googleapis.com/css2?family=Modak": "@font-face{font-family:'Modak';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/modak/v8/EJRYQgs1XtIEsnME.woff) format('woff')}@font-face{font-family:'Modak';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/modak/v8/EJRYQgs1XtIEskMB-hR77LKVTy8.woff2) format('woff2');unicode-range:U+0900-097F,U+1CD0-1CF6,U+1CF8-1CF9,U+200C-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FB}@font-face{font-family:'Modak';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/modak/v8/EJRYQgs1XtIEskMO-hR77LKVTy8.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Modak';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/modak/v8/EJRYQgs1XtIEskMA-hR77LKV.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
    "https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&display=swap": "@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Me5g.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlvAA.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtvAA.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCRc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfABc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCBc4AMP6lbBP.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfBxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfCRc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfABc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfCBc4AMP6lbBP.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfBxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfCxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfChc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfBBc4AMP6lQ.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
    "https://fonts.googleapis.com/css2?family=Roboto:wght@700": "@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlvAA.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCRc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfABc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCBc4AMP6lbBP.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfBxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
-   "https://fonts.googleapis.com/css?family=Voces": "@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v12/-F6_fjJyLyU8d7PGDmk.woff) format('woff')}@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v12/-F6_fjJyLyU8d7PIDm_6pClI_ik.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v12/-F6_fjJyLyU8d7PGDm_6pClI.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
+   "https://fonts.googleapis.com/css?family=Voces": "@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v15/-F6_fjJyLyU8d7PGDmk.woff) format('woff')}@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v15/-F6_fjJyLyU8d7PIDm_6pClI_ik.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v15/-F6_fjJyLyU8d7PGDm_6pClI.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
  }

  220 |           })
  221 |
> 222 |           expect(testCss).toStrictEqual(snapshotCss)
      |                           ^
  223 |         })
  224 |
  225 |         // Re-run build to check if it works when build is cached

  at Object.<anonymous> (integration/font-optimization/test/index.test.js:222:27)

● Font Optimization › with-google › Font optimization for emulated serverless apps › should minify the css

expect(received).toStrictEqual(expected) // deep equality

- Expected  - 1
+ Received  + 1

  Object {
    "https://fonts.googleapis.com/css2?family=Modak": "@font-face{font-family:'Modak';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/modak/v8/EJRYQgs1XtIEsnME.woff) format('woff')}@font-face{font-family:'Modak';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/modak/v8/EJRYQgs1XtIEskMB-hR77LKVTy8.woff2) format('woff2');unicode-range:U+0900-097F,U+1CD0-1CF6,U+1CF8-1CF9,U+200C-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FB}@font-face{font-family:'Modak';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/modak/v8/EJRYQgs1XtIEskMO-hR77LKVTy8.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Modak';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/modak/v8/EJRYQgs1XtIEskMA-hR77LKV.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
    "https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&display=swap": "@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Me5g.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlvAA.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtvAA.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCRc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfABc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCBc4AMP6lbBP.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfBxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfCRc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfABc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfCBc4AMP6lbBP.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfBxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfCxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfChc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:900;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmYUtfBBc4AMP6lQ.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
    "https://fonts.googleapis.com/css2?family=Roboto:wght@700": "@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlvAA.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCRc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfABc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCBc4AMP6lbBP.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfBxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
-   "https://fonts.googleapis.com/css?family=Voces": "@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v12/-F6_fjJyLyU8d7PGDmk.woff) format('woff')}@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v12/-F6_fjJyLyU8d7PIDm_6pClI_ik.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v12/-F6_fjJyLyU8d7PGDm_6pClI.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
+   "https://fonts.googleapis.com/css?family=Voces": "@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v15/-F6_fjJyLyU8d7PGDmk.woff) format('woff')}@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v15/-F6_fjJyLyU8d7PIDm_6pClI_ik.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Voces';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/voces/v15/-F6_fjJyLyU8d7PGDm_6pClI.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
  }

  220 |           })
  221 |
> 222 |           expect(testCss).toStrictEqual(snapshotCss)
      |                           ^
  223 |         })
  224 |
  225 |         // Re-run build to check if it works when build is cached

  at Object.<anonymous> (integration/font-optimization/test/index.test.js:222:27)

@ijjk
Copy link
Member

ijjk commented Jul 1, 2021

Stats from current PR

Default Build (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js fix/error-loop Change
buildDuration 12.9s 13.6s ⚠️ +635ms
buildDurationCached 3.3s 3.4s ⚠️ +111ms
nodeModulesSize 49.3 MB 49.3 MB ⚠️ +871 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary vercel/next.js fix/error-loop Change
/ failed reqs 0 0
/ total time (seconds) 2.346 2.359 ⚠️ +0.01
/ avg req/sec 1065.83 1059.94 ⚠️ -5.89
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.295 1.382 ⚠️ +0.09
/error-in-render avg req/sec 1930.13 1808.83 ⚠️ -121.3
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary vercel/next.js fix/error-loop Change
framework-HASH.js gzip 42 kB 42 kB
main-HASH.js gzip 20.2 kB 20.2 kB ⚠️ +76 B
webpack-HASH.js gzip 810 B 1.49 kB ⚠️ +684 B
359.HASH.js gzip N/A 3.09 kB N/A
Overall change 63 kB 66.9 kB ⚠️ +3.85 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js fix/error-loop Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages Overall increase ⚠️
vercel/next.js canary vercel/next.js fix/error-loop Change
_app-HASH.js gzip 803 B 803 B
_error-HASH.js gzip 3.17 kB 3.18 kB ⚠️ +3 B
amp-HASH.js gzip 526 B 526 B
css-HASH.js gzip 329 B 329 B
hooks-HASH.js gzip 903 B 903 B
index-HASH.js gzip 263 B 263 B
link-HASH.js gzip 1.65 kB 1.65 kB
routerDirect..HASH.js gzip 322 B 322 B
withRouter-HASH.js gzip 320 B 320 B
bb14e60e810b..30f.css gzip 125 B 125 B
Overall change 8.42 kB 8.42 kB ⚠️ +3 B
Client Build Manifests Overall decrease ✓
vercel/next.js canary vercel/next.js fix/error-loop Change
_buildManifest.js gzip 391 B 390 B -1 B
Overall change 391 B 390 B -1 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary vercel/next.js fix/error-loop Change
index.html gzip 525 B 522 B -3 B
link.html gzip 537 B 535 B -2 B
withRouter.html gzip 516 B 515 B -1 B
Overall change 1.58 kB 1.57 kB -6 B

Diffs

Diff for _buildManifest.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   __rewrites: { beforeFiles: [], afterFiles: [], fallback: [] },
   "/": ["static\u002Fchunks\u002Fpages\u002Findex-96d821e908dd023681e4.js"],
   "/_error": [
-    "static\u002Fchunks\u002Fpages\u002F_error-c606d3b8579a00983b58.js"
+    "static\u002Fchunks\u002Fpages\u002F_error-3cd003e3c07a727d48b6.js"
   ],
   "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-99a85859b8a93cc45609.js"],
   "/css": [
Diff for _error-HASH.js
@@ -1,5 +1,5 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
-  [820],
+  [820, 359],
   {
     /***/ 3646: /***/ function(
       module,
Diff for 359.HASH.js
@@ -0,0 +1,846 @@
+(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
+  [359],
+  {
+    /***/ 3646: /***/ function(
+      module,
+      __unused_webpack_exports,
+      __webpack_require__
+    ) {
+      var arrayLikeToArray = __webpack_require__(7228);
+
+      function _arrayWithoutHoles(arr) {
+        if (Array.isArray(arr)) return arrayLikeToArray(arr);
+      }
+
+      module.exports = _arrayWithoutHoles;
+
+      /***/
+    },
+
+    /***/ 9713: /***/ function(module) {
+      function _defineProperty(obj, key, value) {
+        if (key in obj) {
+          Object.defineProperty(obj, key, {
+            value: value,
+            enumerable: true,
+            configurable: true,
+            writable: true
+          });
+        } else {
+          obj[key] = value;
+        }
+
+        return obj;
+      }
+
+      module.exports = _defineProperty;
+
+      /***/
+    },
+
+    /***/ 6860: /***/ function(module) {
+      function _iterableToArray(iter) {
+        if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter))
+          return Array.from(iter);
+      }
+
+      module.exports = _iterableToArray;
+
+      /***/
+    },
+
+    /***/ 8206: /***/ function(module) {
+      function _nonIterableSpread() {
+        throw new TypeError(
+          "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
+        );
+      }
+
+      module.exports = _nonIterableSpread;
+
+      /***/
+    },
+
+    /***/ 319: /***/ function(
+      module,
+      __unused_webpack_exports,
+      __webpack_require__
+    ) {
+      var arrayWithoutHoles = __webpack_require__(3646);
+
+      var iterableToArray = __webpack_require__(6860);
+
+      var unsupportedIterableToArray = __webpack_require__(379);
+
+      var nonIterableSpread = __webpack_require__(8206);
+
+      function _toConsumableArray(arr) {
+        return (
+          arrayWithoutHoles(arr) ||
+          iterableToArray(arr) ||
+          unsupportedIterableToArray(arr) ||
+          nonIterableSpread()
+        );
+      }
+
+      module.exports = _toConsumableArray;
+
+      /***/
+    },
+
+    /***/ 3359: /***/ function(
+      __unused_webpack_module,
+      exports,
+      __webpack_require__
+    ) {
+      "use strict";
+
+      var _classCallCheck = __webpack_require__(4575);
+
+      var _createClass = __webpack_require__(3913);
+
+      var _inherits = __webpack_require__(2205);
+
+      var _possibleConstructorReturn = __webpack_require__(8585);
+
+      var _getPrototypeOf = __webpack_require__(9754);
+
+      function _createSuper(Derived) {
+        var hasNativeReflectConstruct = _isNativeReflectConstruct();
+        return function _createSuperInternal() {
+          var Super = _getPrototypeOf(Derived),
+            result;
+          if (hasNativeReflectConstruct) {
+            var NewTarget = _getPrototypeOf(this).constructor;
+            result = Reflect.construct(Super, arguments, NewTarget);
+          } else {
+            result = Super.apply(this, arguments);
+          }
+          return _possibleConstructorReturn(this, result);
+        };
+      }
+
+      function _isNativeReflectConstruct() {
+        if (typeof Reflect === "undefined" || !Reflect.construct) return false;
+        if (Reflect.construct.sham) return false;
+        if (typeof Proxy === "function") return true;
+        try {
+          Date.prototype.toString.call(
+            Reflect.construct(Date, [], function() {})
+          );
+          return true;
+        } catch (e) {
+          return false;
+        }
+      }
+
+      var _interopRequireDefault = __webpack_require__(5318);
+
+      exports.__esModule = true;
+      exports.default = void 0;
+
+      var _react = _interopRequireDefault(__webpack_require__(7294));
+
+      var _head = _interopRequireDefault(__webpack_require__(639));
+
+      var statusCodes = {
+        400: "Bad Request",
+        404: "This page could not be found",
+        405: "Method Not Allowed",
+        500: "Internal Server Error"
+      };
+
+      function _getInitialProps(_ref) {
+        var res = _ref.res,
+          err = _ref.err;
+        var statusCode =
+          res && res.statusCode ? res.statusCode : err ? err.statusCode : 404;
+        return {
+          statusCode: statusCode
+        };
+      }
+      /**
+       * `Error` component used for handling errors.
+       */
+
+      var Error = /*#__PURE__*/ (function(_react$default$Compon) {
+        _inherits(Error, _react$default$Compon);
+
+        var _super = _createSuper(Error);
+
+        function Error() {
+          _classCallCheck(this, Error);
+
+          return _super.apply(this, arguments);
+        }
+
+        _createClass(Error, [
+          {
+            key: "render",
+            value: function render() {
+              var statusCode = this.props.statusCode;
+              var title =
+                this.props.title ||
+                statusCodes[statusCode] ||
+                "An unexpected error has occurred";
+              return /*#__PURE__*/ _react["default"].createElement(
+                "div",
+                {
+                  style: styles.error
+                },
+                /*#__PURE__*/ _react["default"].createElement(
+                  _head["default"],
+                  null,
+                  /*#__PURE__*/ _react["default"].createElement(
+                    "title",
+                    null,
+                    statusCode
+                      ? "".concat(statusCode, ": ").concat(title)
+                      : "Application error: a client-side exception has occurred"
+                  )
+                ),
+                /*#__PURE__*/ _react["default"].createElement(
+                  "div",
+                  null,
+                  /*#__PURE__*/ _react["default"].createElement("style", {
+                    dangerouslySetInnerHTML: {
+                      __html: "body { margin: 0 }"
+                    }
+                  }),
+                  statusCode
+                    ? /*#__PURE__*/ _react["default"].createElement(
+                        "h1",
+                        {
+                          style: styles.h1
+                        },
+                        statusCode
+                      )
+                    : null,
+                  /*#__PURE__*/ _react["default"].createElement(
+                    "div",
+                    {
+                      style: styles.desc
+                    },
+                    /*#__PURE__*/ _react["default"].createElement(
+                      "h2",
+                      {
+                        style: styles.h2
+                      },
+                      this.props.title || statusCode
+                        ? title
+                        : /*#__PURE__*/ _react["default"].createElement(
+                            _react["default"].Fragment,
+                            null,
+                            "Application error: a client-side exception has occurred (",
+                            /*#__PURE__*/ _react["default"].createElement(
+                              "a",
+                              {
+                                href:
+                                  "https://nextjs.org/docs/messages/client-side-exception-occurred"
+                              },
+                              "developer guidance"
+                            ),
+                            ")"
+                          ),
+                      "."
+                    )
+                  )
+                )
+              );
+            }
+          }
+        ]);
+
+        return Error;
+      })(_react["default"].Component);
+
+      exports.default = Error;
+      Error.displayName = "ErrorPage";
+      Error.getInitialProps = _getInitialProps;
+      Error.origGetInitialProps = _getInitialProps;
+      var styles = {
+        error: {
+          color: "#000",
+          background: "#fff",
+          fontFamily:
+            '-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif',
+          height: "100vh",
+          textAlign: "center",
+          display: "flex",
+          flexDirection: "column",
+          alignItems: "center",
+          justifyContent: "center"
+        },
+        desc: {
+          display: "inline-block",
+          textAlign: "left",
+          lineHeight: "49px",
+          height: "49px",
+          verticalAlign: "middle"
+        },
+        h1: {
+          display: "inline-block",
+          borderRight: "1px solid rgba(0, 0, 0,.3)",
+          margin: 0,
+          marginRight: "20px",
+          padding: "10px 23px 10px 0",
+          fontSize: "24px",
+          fontWeight: 500,
+          verticalAlign: "top"
+        },
+        h2: {
+          fontSize: "14px",
+          fontWeight: "normal",
+          lineHeight: "inherit",
+          margin: 0,
+          padding: 0
+        }
+      };
+
+      /***/
+    },
+
+    /***/ 6046: /***/ function(
+      __unused_webpack_module,
+      exports,
+      __webpack_require__
+    ) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.AmpStateContext = void 0;
+
+      var _react = _interopRequireDefault(__webpack_require__(7294));
+
+      function _interopRequireDefault(obj) {
+        return obj && obj.__esModule
+          ? obj
+          : {
+              default: obj
+            };
+      }
+
+      var AmpStateContext = /*#__PURE__*/ _react["default"].createContext({});
+
+      exports.AmpStateContext = AmpStateContext;
+
+      if (false) {
+      }
+
+      /***/
+    },
+
+    /***/ 3237: /***/ function(
+      __unused_webpack_module,
+      exports,
+      __webpack_require__
+    ) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.isInAmpMode = isInAmpMode;
+      exports.useAmp = useAmp;
+
+      var _react = _interopRequireDefault(__webpack_require__(7294));
+
+      var _ampContext = __webpack_require__(6046);
+
+      function _interopRequireDefault(obj) {
+        return obj && obj.__esModule
+          ? obj
+          : {
+              default: obj
+            };
+      }
+
+      function isInAmpMode() {
+        var _ref =
+            arguments.length > 0 && arguments[0] !== undefined
+              ? arguments[0]
+              : {},
+          _ref$ampFirst = _ref.ampFirst,
+          ampFirst = _ref$ampFirst === void 0 ? false : _ref$ampFirst,
+          _ref$hybrid = _ref.hybrid,
+          hybrid = _ref$hybrid === void 0 ? false : _ref$hybrid,
+          _ref$hasQuery = _ref.hasQuery,
+          hasQuery = _ref$hasQuery === void 0 ? false : _ref$hasQuery;
+
+        return ampFirst || (hybrid && hasQuery);
+      }
+
+      function useAmp() {
+        // Don't assign the context value to a variable to save bytes
+        return isInAmpMode(
+          _react["default"].useContext(_ampContext.AmpStateContext)
+        );
+      }
+
+      /***/
+    },
+
+    /***/ 639: /***/ function(
+      __unused_webpack_module,
+      exports,
+      __webpack_require__
+    ) {
+      "use strict";
+
+      var _defineProperty = __webpack_require__(9713);
+
+      function ownKeys(object, enumerableOnly) {
+        var keys = Object.keys(object);
+        if (Object.getOwnPropertySymbols) {
+          var symbols = Object.getOwnPropertySymbols(object);
+          if (enumerableOnly)
+            symbols = symbols.filter(function(sym) {
+              return Object.getOwnPropertyDescriptor(object, sym).enumerable;
+            });
+          keys.push.apply(keys, symbols);
+        }
+        return keys;
+      }
+
+      function _objectSpread(target) {
+        for (var i = 1; i < arguments.length; i++) {
+          var source = arguments[i] != null ? arguments[i] : {};
+          if (i % 2) {
+            ownKeys(Object(source), true).forEach(function(key) {
+              _defineProperty(target, key, source[key]);
+            });
+          } else if (Object.getOwnPropertyDescriptors) {
+            Object.defineProperties(
+              target,
+              Object.getOwnPropertyDescriptors(source)
+            );
+          } else {
+            ownKeys(Object(source)).forEach(function(key) {
+              Object.defineProperty(
+                target,
+                key,
+                Object.getOwnPropertyDescriptor(source, key)
+              );
+            });
+          }
+        }
+        return target;
+      }
+
+      exports.__esModule = true;
+      exports.defaultHead = defaultHead;
+      exports.default = void 0;
+
+      var _react = _interopRequireWildcard(__webpack_require__(7294));
+
+      var _sideEffect = _interopRequireDefault(__webpack_require__(4766));
+
+      var _ampContext = __webpack_require__(6046);
+
+      var _headManagerContext = __webpack_require__(699);
+
+      var _amp = __webpack_require__(3237);
+
+      function _interopRequireDefault(obj) {
+        return obj && obj.__esModule
+          ? obj
+          : {
+              default: obj
+            };
+      }
+
+      function _getRequireWildcardCache() {
+        if (typeof WeakMap !== "function") return null;
+        var cache = new WeakMap();
+
+        _getRequireWildcardCache = function _getRequireWildcardCache() {
+          return cache;
+        };
+
+        return cache;
+      }
+
+      function _interopRequireWildcard(obj) {
+        if (obj && obj.__esModule) {
+          return obj;
+        }
+
+        if (
+          obj === null ||
+          (typeof obj !== "object" && typeof obj !== "function")
+        ) {
+          return {
+            default: obj
+          };
+        }
+
+        var cache = _getRequireWildcardCache();
+
+        if (cache && cache.has(obj)) {
+          return cache.get(obj);
+        }
+
+        var newObj = {};
+        var hasPropertyDescriptor =
+          Object.defineProperty && Object.getOwnPropertyDescriptor;
+
+        for (var key in obj) {
+          if (Object.prototype.hasOwnProperty.call(obj, key)) {
+            var desc = hasPropertyDescriptor
+              ? Object.getOwnPropertyDescriptor(obj, key)
+              : null;
+
+            if (desc && (desc.get || desc.set)) {
+              Object.defineProperty(newObj, key, desc);
+            } else {
+              newObj[key] = obj[key];
+            }
+          }
+        }
+
+        newObj["default"] = obj;
+
+        if (cache) {
+          cache.set(obj, newObj);
+        }
+
+        return newObj;
+      }
+
+      function defaultHead() {
+        var inAmpMode =
+          arguments.length > 0 && arguments[0] !== undefined
+            ? arguments[0]
+            : false;
+        var head = [
+          /*#__PURE__*/ _react["default"].createElement("meta", {
+            charSet: "utf-8"
+          })
+        ];
+
+        if (!inAmpMode) {
+          head.push(
+            /*#__PURE__*/ _react["default"].createElement("meta", {
+              name: "viewport",
+              content: "width=device-width"
+            })
+          );
+        }
+
+        return head;
+      }
+
+      function onlyReactElement(list, child) {
+        // React children can be "string" or "number" in this case we ignore them for backwards compat
+        if (typeof child === "string" || typeof child === "number") {
+          return list;
+        } // Adds support for React.Fragment
+
+        if (child.type === _react["default"].Fragment) {
+          return list.concat(
+            _react["default"].Children.toArray(child.props.children).reduce(
+              function(fragmentList, fragmentChild) {
+                if (
+                  typeof fragmentChild === "string" ||
+                  typeof fragmentChild === "number"
+                ) {
+                  return fragmentList;
+                }
+
+                return fragmentList.concat(fragmentChild);
+              },
+              []
+            )
+          );
+        }
+
+        return list.concat(child);
+      }
+
+      var METATYPES = ["name", "httpEquiv", "charSet", "itemProp"];
+      /*
+returns a function for filtering head child elements
+which shouldn't be duplicated, like <title/>
+Also adds support for deduplicated `key` properties
+*/
+
+      function unique() {
+        var keys = new Set();
+        var tags = new Set();
+        var metaTypes = new Set();
+        var metaCategories = {};
+        return function(h) {
+          var isUnique = true;
+          var hasKey = false;
+
+          if (h.key && typeof h.key !== "number" && h.key.indexOf("$") > 0) {
+            hasKey = true;
+            var key = h.key.slice(h.key.indexOf("$") + 1);
+
+            if (keys.has(key)) {
+              isUnique = false;
+            } else {
+              keys.add(key);
+            }
+          } // eslint-disable-next-line default-case
+
+          switch (h.type) {
+            case "title":
+            case "base":
+              if (tags.has(h.type)) {
+                isUnique = false;
+              } else {
+                tags.add(h.type);
+              }
+
+              break;
+
+            case "meta":
+              for (var i = 0, len = METATYPES.length; i < len; i++) {
+                var metatype = METATYPES[i];
+                if (!h.props.hasOwnProperty(metatype)) continue;
+
+                if (metatype === "charSet") {
+                  if (metaTypes.has(metatype)) {
+                    isUnique = false;
+                  } else {
+                    metaTypes.add(metatype);
+                  }
+                } else {
+                  var category = h.props[metatype];
+                  var categories = metaCategories[metatype] || new Set();
+
+                  if (
+                    (metatype !== "name" || !hasKey) &&
+                    categories.has(category)
+                  ) {
+                    isUnique = false;
+                  } else {
+                    categories.add(category);
+                    metaCategories[metatype] = categories;
+                  }
+                }
+              }
+
+              break;
+          }
+
+          return isUnique;
+        };
+      }
+      /**
+       *
+       * @param headElements List of multiple <Head> instances
+       */
+
+      function reduceComponents(headElements, props) {
+        return headElements
+          .reduce(function(list, headElement) {
+            var headElementChildren = _react["default"].Children.toArray(
+              headElement.props.children
+            );
+
+            return list.concat(headElementChildren);
+          }, [])
+          .reduce(onlyReactElement, [])
+          .reverse()
+          .concat(defaultHead(props.inAmpMode))
+          .filter(unique())
+          .reverse()
+          .map(function(c, i) {
+            var key = c.key || i;
+
+            if (true && !props.inAmpMode) {
+              if (
+                c.type === "link" &&
+                c.props["href"] && // TODO(prateekbh@): Replace this with const from `constants` when the tree shaking works.
+                [
+                  "https://fonts.googleapis.com/css",
+                  "https://use.typekit.net/"
+                ].some(function(url) {
+                  return c.props["href"].startsWith(url);
+                })
+              ) {
+                var newProps = _objectSpread({}, c.props || {});
+
+                newProps["data-href"] = newProps["href"];
+                newProps["href"] = undefined; // Add this attribute to make it easy to identify optimized tags
+
+                newProps["data-optimized-fonts"] = true;
+                return /*#__PURE__*/ _react["default"].cloneElement(
+                  c,
+                  newProps
+                );
+              }
+            }
+
+            return /*#__PURE__*/ _react["default"].cloneElement(c, {
+              key: key
+            });
+          });
+      }
+      /**
+       * This component injects elements to `<head>` of your page.
+       * To avoid duplicated `tags` in `<head>` you can use the `key` property, which will make sure every tag is only rendered once.
+       */
+
+      function Head(_ref) {
+        var children = _ref.children;
+        var ampState = (0, _react.useContext)(_ampContext.AmpStateContext);
+        var headManager = (0, _react.useContext)(
+          _headManagerContext.HeadManagerContext
+        );
+        return /*#__PURE__*/ _react["default"].createElement(
+          _sideEffect["default"],
+          {
+            reduceComponentsToState: reduceComponents,
+            headManager: headManager,
+            inAmpMode: (0, _amp.isInAmpMode)(ampState)
+          },
+          children
+        );
+      }
+
+      var _default = Head;
+      exports.default = _default;
+
+      /***/
+    },
+
+    /***/ 4766: /***/ function(
+      __unused_webpack_module,
+      exports,
+      __webpack_require__
+    ) {
+      "use strict";
+
+      var _toConsumableArray = __webpack_require__(319);
+
+      var _classCallCheck = __webpack_require__(4575);
+
+      var _createClass = __webpack_require__(3913);
+
+      var _assertThisInitialized = __webpack_require__(1506);
+
+      var _inherits = __webpack_require__(2205);
+
+      var _possibleConstructorReturn = __webpack_require__(8585);
+
+      var _getPrototypeOf = __webpack_require__(9754);
+
+      function _createSuper(Derived) {
+        var hasNativeReflectConstruct = _isNativeReflectConstruct();
+        return function _createSuperInternal() {
+          var Super = _getPrototypeOf(Derived),
+            result;
+          if (hasNativeReflectConstruct) {
+            var NewTarget = _getPrototypeOf(this).constructor;
+            result = Reflect.construct(Super, arguments, NewTarget);
+          } else {
+            result = Super.apply(this, arguments);
+          }
+          return _possibleConstructorReturn(this, result);
+        };
+      }
+
+      function _isNativeReflectConstruct() {
+        if (typeof Reflect === "undefined" || !Reflect.construct) return false;
+        if (Reflect.construct.sham) return false;
+        if (typeof Proxy === "function") return true;
+        try {
+          Date.prototype.toString.call(
+            Reflect.construct(Date, [], function() {})
+          );
+          return true;
+        } catch (e) {
+          return false;
+        }
+      }
+
+      exports.__esModule = true;
+      exports.default = void 0;
+
+      var _react = __webpack_require__(7294);
+
+      var isServer = false;
+
+      var _default = /*#__PURE__*/ (function(_react$Component) {
+        _inherits(_default, _react$Component);
+
+        var _super = _createSuper(_default);
+
+        function _default(props) {
+          var _this;
+
+          _classCallCheck(this, _default);
+
+          _this = _super.call(this, props);
+          _this._hasHeadManager = void 0;
+
+          _this.emitChange = function() {
+            if (_this._hasHeadManager) {
+              _this.props.headManager.updateHead(
+                _this.props.reduceComponentsToState(
+                  _toConsumableArray(_this.props.headManager.mountedInstances),
+                  _this.props
+                )
+              );
+            }
+          };
+
+          _this._hasHeadManager =
+            _this.props.headManager && _this.props.headManager.mountedInstances;
+
+          if (isServer && _this._hasHeadManager) {
+            _this.props.headManager.mountedInstances.add(
+              _assertThisInitialized(_this)
+            );
+
+            _this.emitChange();
+          }
+
+          return _this;
+        }
+
+        _createClass(_default, [
+          {
+            key: "componentDidMount",
+            value: function componentDidMount() {
+              if (this._hasHeadManager) {
+                this.props.headManager.mountedInstances.add(this);
+              }
+
+              this.emitChange();
+            }
+          },
+          {
+            key: "componentDidUpdate",
+            value: function componentDidUpdate() {
+              this.emitChange();
+            }
+          },
+          {
+            key: "componentWillUnmount",
+            value: function componentWillUnmount() {
+              if (this._hasHeadManager) {
+                this.props.headManager.mountedInstances["delete"](this);
+              }
+
+              this.emitChange();
+            }
+          },
+          {
+            key: "render",
+            value: function render() {
+              return null;
+            }
+          }
+        ]);
+
+        return _default;
+      })(_react.Component);
+
+      exports.default = _default;
+
+      /***/
+    }
+  }
+]);
Diff for main-HASH.js
@@ -1385,40 +1385,65 @@
         } // Make sure we log the error to the console, otherwise users can't track down issues.
 
         console.error(err);
-        return pageLoader.loadPage("/_error").then(function(_ref5) {
-          var ErrorComponent = _ref5.page,
-            styleSheets = _ref5.styleSheets;
-          // In production we do a normal render with the `ErrorComponent` as component.
-          // If we've gotten here upon initial render, we can use the props from the server.
-          // Otherwise, we need to call `getInitialProps` on `App` before mounting.
-          var AppTree = wrapApp(App);
-          var appCtx = {
-            Component: ErrorComponent,
-            AppTree: AppTree,
-            router: router,
-            ctx: {
-              err: err,
-              pathname: page,
-              query: query,
-              asPath: asPath,
-              AppTree: AppTree
-            }
-          };
-          return Promise.resolve(
-            renderErrorProps.props
-              ? renderErrorProps.props
-              : (0, _utils.loadGetInitialProps)(App, appCtx)
-          ).then(function(initProps) {
-            return doRender(
-              (0, _extends2["default"])({}, renderErrorProps, {
+        return pageLoader
+          .loadPage("/_error")
+          .then(function(_ref5) {
+            var ErrorComponent = _ref5.page,
+              styleSheets = _ref5.styleSheets;
+
+            var _lastAppProps;
+
+            return ((_lastAppProps = lastAppProps) == null
+              ? void 0
+              : _lastAppProps.Component) === ErrorComponent
+              ? __webpack_require__
+                  .e(/* import() */ 359)
+                  .then(__webpack_require__.bind(__webpack_require__, 3359))
+                  .then(function(m) {
+                    return {
+                      ErrorComponent: m["default"],
+                      styleSheets: []
+                    };
+                  })
+              : {
+                  ErrorComponent: ErrorComponent,
+                  styleSheets: styleSheets
+                };
+          })
+          .then(function(_ref6) {
+            var ErrorComponent = _ref6.ErrorComponent,
+              styleSheets = _ref6.styleSheets;
+            // In production we do a normal render with the `ErrorComponent` as component.
+            // If we've gotten here upon initial render, we can use the props from the server.
+            // Otherwise, we need to call `getInitialProps` on `App` before mounting.
+            var AppTree = wrapApp(App);
+            var appCtx = {
+              Component: ErrorComponent,
+              AppTree: AppTree,
+              router: router,
+              ctx: {
                 err: err,
-                Component: ErrorComponent,
-                styleSheets: styleSheets,
-                props: initProps
-              })
-            );
+                pathname: page,
+                query: query,
+                asPath: asPath,
+                AppTree: AppTree
+              }
+            };
+            return Promise.resolve(
+              renderErrorProps.props
+                ? renderErrorProps.props
+                : (0, _utils.loadGetInitialProps)(App, appCtx)
+            ).then(function(initProps) {
+              return doRender(
+                (0, _extends2["default"])({}, renderErrorProps, {
+                  err: err,
+                  Component: ErrorComponent,
+                  styleSheets: styleSheets,
+                  props: initProps
+                })
+              );
+            });
           });
-        });
       }
 
       var reactRoot = null; // On initial render a hydrate should always happen
@@ -1511,8 +1536,8 @@
         );
       }
 
-      function AppContainer(_ref6) {
-        var children = _ref6.children;
+      function AppContainer(_ref7) {
+        var children = _ref7.children;
         return /*#__PURE__*/ _react["default"].createElement(
           Container,
           {
@@ -1615,9 +1640,9 @@
           var noscript = document.querySelector("noscript[data-n-css]");
           var nonce =
             noscript == null ? void 0 : noscript.getAttribute("data-n-css");
-          styleSheets.forEach(function(_ref7) {
-            var href = _ref7.href,
-              text = _ref7.text;
+          styleSheets.forEach(function(_ref8) {
+            var href = _ref8.href,
+              text = _ref8.text;
 
             if (!currentHrefs.has(href)) {
               var styleTag = document.createElement("style");
@@ -1670,8 +1695,8 @@
               // This should be an invariant:
               referenceNode
             ) {
-              styleSheets.forEach(function(_ref8) {
-                var href = _ref8.href;
+              styleSheets.forEach(function(_ref9) {
+                var href = _ref9.href;
                 var targetTag = document.querySelector(
                   'style[data-n-href="'.concat(href, '"]')
                 );
@@ -1745,9 +1770,9 @@
         return renderPromise;
       }
 
-      function Root(_ref9) {
-        var callbacks = _ref9.callbacks,
-          children = _ref9.children;
+      function Root(_ref10) {
+        var callbacks = _ref10.callbacks,
+          children = _ref10.children;
 
         // We use `useLayoutEffect` to guarantee the callbacks are executed
         // as soon as React flushes the update
@@ -1780,8 +1805,8 @@
       } // Dummy component that we render as a child of Root so that we can
       // toggle the correct styles before the page is rendered.
 
-      function Head(_ref10) {
-        var callback = _ref10.callback;
+      function Head(_ref11) {
+        var callback = _ref11.callback;
 
         // We use `useLayoutEffect` to guarantee the callback is executed
         // as soon as React flushes the update.
Diff for webpack-HASH.js
@@ -134,6 +134,46 @@
       /******/
     };
     /******/
+  })(); /* webpack/runtime/ensure chunk */
+  /******/
+
+  /******/ /******/ !(function() {
+    /******/ __webpack_require__.f = {}; // This file contains only the entry chunk. // The chunk loading function for additional chunks
+    /******/ /******/ /******/ __webpack_require__.e = function(chunkId) {
+      /******/ return Promise.all(
+        Object.keys(__webpack_require__.f).reduce(function(promises, key) {
+          /******/ __webpack_require__.f[key](chunkId, promises);
+          /******/ return promises;
+          /******/
+        }, [])
+      );
+      /******/
+    };
+    /******/
+  })(); /* webpack/runtime/get javascript chunk filename */
+  /******/
+
+  /******/ /******/ !(function() {
+    /******/ // This function allow to reference async chunks
+    /******/ __webpack_require__.u = function(chunkId) {
+      /******/ // return url for filenames based on template
+      /******/ return (
+        "static/chunks/" + chunkId + "." + "9e8a22bf0eefac79f784" + ".js"
+      );
+      /******/
+    };
+    /******/
+  })(); /* webpack/runtime/get mini-css chunk filename */
+  /******/
+
+  /******/ /******/ !(function() {
+    /******/ // This function allow to reference all chunks
+    /******/ __webpack_require__.miniCssF = function(chunkId) {
+      /******/ // return url for filenames based on template
+      /******/ return "static/css/" + "59de118426c393f58653" + ".css";
+      /******/
+    };
+    /******/
   })(); /* webpack/runtime/global */
   /******/
 
@@ -158,6 +198,81 @@
       return Object.prototype.hasOwnProperty.call(obj, prop);
     };
     /******/
+  })(); /* webpack/runtime/load script */
+  /******/
+
+  /******/ /******/ !(function() {
+    /******/ var inProgress = {};
+    /******/ var dataWebpackPrefix = "_N_E:"; // loadScript function to load a script via script tag
+    /******/ /******/ __webpack_require__.l = function(
+      url,
+      done,
+      key,
+      chunkId
+    ) {
+      /******/ if (inProgress[url]) {
+        inProgress[url].push(done);
+        return;
+      }
+      /******/ var script, needAttach;
+      /******/ if (key !== undefined) {
+        /******/ var scripts = document.getElementsByTagName("script");
+        /******/ for (var i = 0; i < scripts.length; i++) {
+          /******/ var s = scripts[i];
+          /******/ if (
+            s.getAttribute("src") == url ||
+            s.getAttribute("data-webpack") == dataWebpackPrefix + key
+          ) {
+            script = s;
+            break;
+          }
+          /******/
+        }
+        /******/
+      }
+      /******/ if (!script) {
+        /******/ needAttach = true;
+        /******/ script = document.createElement("script");
+        /******/
+
+        /******/ script.charset = "utf-8";
+        /******/ script.timeout = 120;
+        /******/ if (__webpack_require__.nc) {
+          /******/ script.setAttribute("nonce", __webpack_require__.nc);
+          /******/
+        }
+        /******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
+        /******/ script.src = url;
+        /******/
+      }
+      /******/ inProgress[url] = [done];
+      /******/ var onScriptComplete = function(prev, event) {
+        /******/ // avoid mem leaks in IE.
+        /******/ script.onerror = script.onload = null;
+        /******/ clearTimeout(timeout);
+        /******/ var doneFns = inProgress[url];
+        /******/ delete inProgress[url];
+        /******/ script.parentNode && script.parentNode.removeChild(script);
+        /******/ doneFns &&
+          doneFns.forEach(function(fn) {
+            return fn(event);
+          });
+        /******/ if (prev) return prev(event);
+        /******/
+      };
+      /******/ /******/ var timeout = setTimeout(
+        onScriptComplete.bind(null, undefined, {
+          type: "timeout",
+          target: script
+        }),
+        120000
+      );
+      /******/ script.onerror = onScriptComplete.bind(null, script.onerror);
+      /******/ script.onload = onScriptComplete.bind(null, script.onload);
+      /******/ needAttach && document.head.appendChild(script);
+      /******/
+    };
+    /******/
   })(); /* webpack/runtime/make namespace object */
   /******/
 
@@ -193,10 +308,80 @@
     /******/ var installedChunks = {
       /******/ 272: 0
       /******/
-    }; // no chunk on demand loading // no prefetching // no preloaded // no HMR // no HMR manifest
+    };
     /******/
 
-    /******/ /******/
+    /******/ __webpack_require__.f.j = function(chunkId, promises) {
+      /******/ // JSONP chunk loading for javascript
+      /******/ var installedChunkData = __webpack_require__.o(
+        installedChunks,
+        chunkId
+      )
+        ? installedChunks[chunkId]
+        : undefined;
+      /******/ if (installedChunkData !== 0) {
+        // 0 means "already installed".
+        /******/
+
+        /******/ // a Promise means "currently loading".
+        /******/ if (installedChunkData) {
+          /******/ promises.push(installedChunkData[2]);
+          /******/
+        } else {
+          /******/ if (272 != chunkId) {
+            /******/ // setup Promise in chunk cache
+            /******/ var promise = new Promise(function(resolve, reject) {
+              installedChunkData = installedChunks[chunkId] = [resolve, reject];
+            });
+            /******/ promises.push((installedChunkData[2] = promise)); // start chunk loading
+            /******/
+
+            /******/ /******/ var url =
+              __webpack_require__.p + __webpack_require__.u(chunkId); // create error before stack unwound to get useful stacktrace later
+            /******/ /******/ var error = new Error();
+            /******/ var loadingEnded = function(event) {
+              /******/ if (__webpack_require__.o(installedChunks, chunkId)) {
+                /******/ installedChunkData = installedChunks[chunkId];
+                /******/ if (installedChunkData !== 0)
+                  installedChunks[chunkId] = undefined;
+                /******/ if (installedChunkData) {
+                  /******/ var errorType =
+                    event && (event.type === "load" ? "missing" : event.type);
+                  /******/ var realSrc =
+                    event && event.target && event.target.src;
+                  /******/ error.message =
+                    "Loading chunk " +
+                    chunkId +
+                    " failed.\n(" +
+                    errorType +
+                    ": " +
+                    realSrc +
+                    ")";
+                  /******/ error.name = "ChunkLoadError";
+                  /******/ error.type = errorType;
+                  /******/ error.request = realSrc;
+                  /******/ installedChunkData[1](error);
+                  /******/
+                }
+                /******/
+              }
+              /******/
+            };
+            /******/ __webpack_require__.l(
+              url,
+              loadingEnded,
+              "chunk-" + chunkId,
+              chunkId
+            );
+            /******/
+          } else installedChunks[chunkId] = 0;
+          /******/
+        }
+        /******/
+      }
+      /******/
+    }; // no prefetching // no preloaded // no HMR // no HMR manifest
+    /******/
 
     /******/ /******/
Diff for index.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-78af6fe89161f65f5762.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-c14d70924bc10b27e8cb.js"
+      src="/_next/static/chunks/webpack-42f1545080114fddca9d.js"
       defer=""
     ></script>
     <script
@@ -19,7 +19,7 @@
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/main-4aac7c58023fe877c9e3.js"
+      src="/_next/static/chunks/main-4e4ce95bcecaac8aab47.js"
       defer=""
     ></script>
     <script
Diff for link.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-78af6fe89161f65f5762.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-c14d70924bc10b27e8cb.js"
+      src="/_next/static/chunks/webpack-42f1545080114fddca9d.js"
       defer=""
     ></script>
     <script
@@ -19,7 +19,7 @@
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/main-4aac7c58023fe877c9e3.js"
+      src="/_next/static/chunks/main-4e4ce95bcecaac8aab47.js"
       defer=""
     ></script>
     <script
Diff for withRouter.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-78af6fe89161f65f5762.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-c14d70924bc10b27e8cb.js"
+      src="/_next/static/chunks/webpack-42f1545080114fddca9d.js"
       defer=""
     ></script>
     <script
@@ -19,7 +19,7 @@
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/main-4aac7c58023fe877c9e3.js"
+      src="/_next/static/chunks/main-4e4ce95bcecaac8aab47.js"
       defer=""
     ></script>
     <script

Webpack 4 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js fix/error-loop Change
buildDuration 11.8s 11.9s ⚠️ +121ms
buildDurationCached 4.9s 4.7s -159ms
nodeModulesSize 49.3 MB 49.3 MB ⚠️ +871 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary vercel/next.js fix/error-loop Change
/ failed reqs 0 0
/ total time (seconds) 2.441 2.384 -0.06
/ avg req/sec 1024.1 1048.45 +24.35
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.305 1.323 ⚠️ +0.02
/error-in-render avg req/sec 1916 1889.4 ⚠️ -26.6
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary vercel/next.js fix/error-loop Change
677f882d2ed8..HASH.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 41.8 kB 41.8 kB
main-HASH.js gzip 7.99 kB 8.07 kB ⚠️ +82 B
webpack-HASH.js gzip 757 B 1.19 kB ⚠️ +434 B
14.HASH.js gzip N/A 3.11 kB N/A
Overall change 63.9 kB 67.5 kB ⚠️ +3.62 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js fix/error-loop Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages Overall increase ⚠️
vercel/next.js canary vercel/next.js fix/error-loop Change
_app-HASH.js gzip 1.07 kB 1.07 kB
_error-HASH.js gzip 3.83 kB 3.83 kB ⚠️ +3 B
amp-HASH.js gzip 531 B 531 B
css-HASH.js gzip 333 B 333 B
hooks-HASH.js gzip 910 B 910 B
index-HASH.js gzip 227 B 227 B
link-HASH.js gzip 1.64 kB 1.64 kB
routerDirect..HASH.js gzip 295 B 295 B
withRouter-HASH.js gzip 292 B 292 B
e025d2764813..52f.css gzip 125 B 125 B
Overall change 9.26 kB 9.26 kB ⚠️ +3 B
Client Build Manifests Overall decrease ✓
vercel/next.js canary vercel/next.js fix/error-loop Change
_buildManifest.js gzip 422 B 418 B -4 B
Overall change 422 B 418 B -4 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary vercel/next.js fix/error-loop Change
index.html gzip 567 B 566 B -1 B
link.html gzip 580 B 579 B -1 B
withRouter.html gzip 561 B 559 B -2 B
Overall change 1.71 kB 1.7 kB -4 B

Diffs

Diff for _buildManifest.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   __rewrites: { beforeFiles: [], afterFiles: [], fallback: [] },
   "/": ["static\u002Fchunks\u002Fpages\u002Findex-b460df3d63326fbb06a1.js"],
   "/_error": [
-    "static\u002Fchunks\u002Fpages\u002F_error-5225b5d6d91905cc2b11.js"
+    "static\u002Fchunks\u002Fpages\u002F_error-bef1871fd32355e6147b.js"
   ],
   "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-5b1703f6b64f268c0fdc.js"],
   "/css": [
Diff for _error-HASH.js
@@ -1,5 +1,5 @@
 _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
-  [5],
+  [5, 14],
   {
     /***/ "/a9y": /***/ function(module, exports, __webpack_require__) {
       "use strict";
Diff for 14.HASH.js
@@ -0,0 +1,818 @@
+(window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
+  [14],
+  {
+    /***/ "/a9y": /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      var _classCallCheck = __webpack_require__("lwsE");
+
+      var _createClass = __webpack_require__("W8MJ");
+
+      var _inherits = __webpack_require__("7W2i");
+
+      var _possibleConstructorReturn = __webpack_require__("a1gu");
+
+      var _getPrototypeOf = __webpack_require__("Nsbk");
+
+      function _createSuper(Derived) {
+        var hasNativeReflectConstruct = _isNativeReflectConstruct();
+        return function _createSuperInternal() {
+          var Super = _getPrototypeOf(Derived),
+            result;
+          if (hasNativeReflectConstruct) {
+            var NewTarget = _getPrototypeOf(this).constructor;
+            result = Reflect.construct(Super, arguments, NewTarget);
+          } else {
+            result = Super.apply(this, arguments);
+          }
+          return _possibleConstructorReturn(this, result);
+        };
+      }
+
+      function _isNativeReflectConstruct() {
+        if (typeof Reflect === "undefined" || !Reflect.construct) return false;
+        if (Reflect.construct.sham) return false;
+        if (typeof Proxy === "function") return true;
+        try {
+          Date.prototype.toString.call(
+            Reflect.construct(Date, [], function() {})
+          );
+          return true;
+        } catch (e) {
+          return false;
+        }
+      }
+
+      var _interopRequireDefault = __webpack_require__("TqRt");
+
+      exports.__esModule = true;
+      exports["default"] = void 0;
+
+      var _react = _interopRequireDefault(__webpack_require__("q1tI"));
+
+      var _head = _interopRequireDefault(__webpack_require__("mLbm"));
+
+      var statusCodes = {
+        400: "Bad Request",
+        404: "This page could not be found",
+        405: "Method Not Allowed",
+        500: "Internal Server Error"
+      };
+
+      function _getInitialProps(_ref) {
+        var res = _ref.res,
+          err = _ref.err;
+        var statusCode =
+          res && res.statusCode ? res.statusCode : err ? err.statusCode : 404;
+        return {
+          statusCode: statusCode
+        };
+      }
+      /**
+       * `Error` component used for handling errors.
+       */
+
+      var Error = /*#__PURE__*/ (function(_react$default$Compon) {
+        _inherits(Error, _react$default$Compon);
+
+        var _super = _createSuper(Error);
+
+        function Error() {
+          _classCallCheck(this, Error);
+
+          return _super.apply(this, arguments);
+        }
+
+        _createClass(Error, [
+          {
+            key: "render",
+            value: function render() {
+              var statusCode = this.props.statusCode;
+              var title =
+                this.props.title ||
+                statusCodes[statusCode] ||
+                "An unexpected error has occurred";
+              return /*#__PURE__*/ _react["default"].createElement(
+                "div",
+                {
+                  style: styles.error
+                },
+                /*#__PURE__*/ _react["default"].createElement(
+                  _head["default"],
+                  null,
+                  /*#__PURE__*/ _react["default"].createElement(
+                    "title",
+                    null,
+                    statusCode
+                      ? "".concat(statusCode, ": ").concat(title)
+                      : "Application error: a client-side exception has occurred"
+                  )
+                ),
+                /*#__PURE__*/ _react["default"].createElement(
+                  "div",
+                  null,
+                  /*#__PURE__*/ _react["default"].createElement("style", {
+                    dangerouslySetInnerHTML: {
+                      __html: "body { margin: 0 }"
+                    }
+                  }),
+                  statusCode
+                    ? /*#__PURE__*/ _react["default"].createElement(
+                        "h1",
+                        {
+                          style: styles.h1
+                        },
+                        statusCode
+                      )
+                    : null,
+                  /*#__PURE__*/ _react["default"].createElement(
+                    "div",
+                    {
+                      style: styles.desc
+                    },
+                    /*#__PURE__*/ _react["default"].createElement(
+                      "h2",
+                      {
+                        style: styles.h2
+                      },
+                      this.props.title || statusCode
+                        ? title
+                        : /*#__PURE__*/ _react["default"].createElement(
+                            _react["default"].Fragment,
+                            null,
+                            "Application error: a client-side exception has occurred (",
+                            /*#__PURE__*/ _react["default"].createElement(
+                              "a",
+                              {
+                                href:
+                                  "https://nextjs.org/docs/messages/client-side-exception-occurred"
+                              },
+                              "developer guidance"
+                            ),
+                            ")"
+                          ),
+                      "."
+                    )
+                  )
+                )
+              );
+            }
+          }
+        ]);
+
+        return Error;
+      })(_react["default"].Component);
+
+      exports["default"] = Error;
+      Error.displayName = "ErrorPage";
+      Error.getInitialProps = _getInitialProps;
+      Error.origGetInitialProps = _getInitialProps;
+      var styles = {
+        error: {
+          color: "#000",
+          background: "#fff",
+          fontFamily:
+            '-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif',
+          height: "100vh",
+          textAlign: "center",
+          display: "flex",
+          flexDirection: "column",
+          alignItems: "center",
+          justifyContent: "center"
+        },
+        desc: {
+          display: "inline-block",
+          textAlign: "left",
+          lineHeight: "49px",
+          height: "49px",
+          verticalAlign: "middle"
+        },
+        h1: {
+          display: "inline-block",
+          borderRight: "1px solid rgba(0, 0, 0,.3)",
+          margin: 0,
+          marginRight: "20px",
+          padding: "10px 23px 10px 0",
+          fontSize: "24px",
+          fontWeight: 500,
+          verticalAlign: "top"
+        },
+        h2: {
+          fontSize: "14px",
+          fontWeight: "normal",
+          lineHeight: "inherit",
+          margin: 0,
+          padding: 0
+        }
+      };
+
+      /***/
+    },
+
+    /***/ BdAR: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      var _toConsumableArray = __webpack_require__("RIqP");
+
+      var _classCallCheck = __webpack_require__("lwsE");
+
+      var _createClass = __webpack_require__("W8MJ");
+
+      var _assertThisInitialized = __webpack_require__("PJYZ");
+
+      var _inherits = __webpack_require__("7W2i");
+
+      var _possibleConstructorReturn = __webpack_require__("a1gu");
+
+      var _getPrototypeOf = __webpack_require__("Nsbk");
+
+      function _createSuper(Derived) {
+        var hasNativeReflectConstruct = _isNativeReflectConstruct();
+        return function _createSuperInternal() {
+          var Super = _getPrototypeOf(Derived),
+            result;
+          if (hasNativeReflectConstruct) {
+            var NewTarget = _getPrototypeOf(this).constructor;
+            result = Reflect.construct(Super, arguments, NewTarget);
+          } else {
+            result = Super.apply(this, arguments);
+          }
+          return _possibleConstructorReturn(this, result);
+        };
+      }
+
+      function _isNativeReflectConstruct() {
+        if (typeof Reflect === "undefined" || !Reflect.construct) return false;
+        if (Reflect.construct.sham) return false;
+        if (typeof Proxy === "function") return true;
+        try {
+          Date.prototype.toString.call(
+            Reflect.construct(Date, [], function() {})
+          );
+          return true;
+        } catch (e) {
+          return false;
+        }
+      }
+
+      exports.__esModule = true;
+      exports["default"] = void 0;
+
+      var _react = __webpack_require__("q1tI");
+
+      var isServer = false;
+
+      var _default = /*#__PURE__*/ (function(_react$Component) {
+        _inherits(_default, _react$Component);
+
+        var _super = _createSuper(_default);
+
+        function _default(props) {
+          var _this;
+
+          _classCallCheck(this, _default);
+
+          _this = _super.call(this, props);
+          _this._hasHeadManager = void 0;
+
+          _this.emitChange = function() {
+            if (_this._hasHeadManager) {
+              _this.props.headManager.updateHead(
+                _this.props.reduceComponentsToState(
+                  _toConsumableArray(_this.props.headManager.mountedInstances),
+                  _this.props
+                )
+              );
+            }
+          };
+
+          _this._hasHeadManager =
+            _this.props.headManager && _this.props.headManager.mountedInstances;
+
+          if (isServer && _this._hasHeadManager) {
+            _this.props.headManager.mountedInstances.add(
+              _assertThisInitialized(_this)
+            );
+
+            _this.emitChange();
+          }
+
+          return _this;
+        }
+
+        _createClass(_default, [
+          {
+            key: "componentDidMount",
+            value: function componentDidMount() {
+              if (this._hasHeadManager) {
+                this.props.headManager.mountedInstances.add(this);
+              }
+
+              this.emitChange();
+            }
+          },
+          {
+            key: "componentDidUpdate",
+            value: function componentDidUpdate() {
+              this.emitChange();
+            }
+          },
+          {
+            key: "componentWillUnmount",
+            value: function componentWillUnmount() {
+              if (this._hasHeadManager) {
+                this.props.headManager.mountedInstances["delete"](this);
+              }
+
+              this.emitChange();
+            }
+          },
+          {
+            key: "render",
+            value: function render() {
+              return null;
+            }
+          }
+        ]);
+
+        return _default;
+      })(_react.Component);
+
+      exports["default"] = _default;
+
+      /***/
+    },
+
+    /***/ Bnag: /***/ function(module, exports) {
+      function _nonIterableSpread() {
+        throw new TypeError(
+          "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
+        );
+      }
+
+      module.exports = _nonIterableSpread;
+
+      /***/
+    },
+
+    /***/ EbDI: /***/ function(module, exports) {
+      function _iterableToArray(iter) {
+        if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter))
+          return Array.from(iter);
+      }
+
+      module.exports = _iterableToArray;
+
+      /***/
+    },
+
+    /***/ Ijbi: /***/ function(module, exports, __webpack_require__) {
+      var arrayLikeToArray = __webpack_require__("WkPL");
+
+      function _arrayWithoutHoles(arr) {
+        if (Array.isArray(arr)) return arrayLikeToArray(arr);
+      }
+
+      module.exports = _arrayWithoutHoles;
+
+      /***/
+    },
+
+    /***/ RIqP: /***/ function(module, exports, __webpack_require__) {
+      var arrayWithoutHoles = __webpack_require__("Ijbi");
+
+      var iterableToArray = __webpack_require__("EbDI");
+
+      var unsupportedIterableToArray = __webpack_require__("ZhPi");
+
+      var nonIterableSpread = __webpack_require__("Bnag");
+
+      function _toConsumableArray(arr) {
+        return (
+          arrayWithoutHoles(arr) ||
+          iterableToArray(arr) ||
+          unsupportedIterableToArray(arr) ||
+          nonIterableSpread()
+        );
+      }
+
+      module.exports = _toConsumableArray;
+
+      /***/
+    },
+
+    /***/ dTAc: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.isInAmpMode = isInAmpMode;
+      exports.useAmp = useAmp;
+
+      var _react = _interopRequireDefault(__webpack_require__("q1tI"));
+
+      var _ampContext = __webpack_require__("r55Z");
+
+      function _interopRequireDefault(obj) {
+        return obj && obj.__esModule
+          ? obj
+          : {
+              default: obj
+            };
+      }
+
+      function isInAmpMode() {
+        var _ref =
+            arguments.length > 0 && arguments[0] !== undefined
+              ? arguments[0]
+              : {},
+          _ref$ampFirst = _ref.ampFirst,
+          ampFirst = _ref$ampFirst === void 0 ? false : _ref$ampFirst,
+          _ref$hybrid = _ref.hybrid,
+          hybrid = _ref$hybrid === void 0 ? false : _ref$hybrid,
+          _ref$hasQuery = _ref.hasQuery,
+          hasQuery = _ref$hasQuery === void 0 ? false : _ref$hasQuery;
+
+        return ampFirst || (hybrid && hasQuery);
+      }
+
+      function useAmp() {
+        // Don't assign the context value to a variable to save bytes
+        return isInAmpMode(
+          _react["default"].useContext(_ampContext.AmpStateContext)
+        );
+      }
+
+      /***/
+    },
+
+    /***/ lSNA: /***/ function(module, exports) {
+      function _defineProperty(obj, key, value) {
+        if (key in obj) {
+          Object.defineProperty(obj, key, {
+            value: value,
+            enumerable: true,
+            configurable: true,
+            writable: true
+          });
+        } else {
+          obj[key] = value;
+        }
+
+        return obj;
+      }
+
+      module.exports = _defineProperty;
+
+      /***/
+    },
+
+    /***/ mLbm: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      var _defineProperty = __webpack_require__("lSNA");
+
+      function ownKeys(object, enumerableOnly) {
+        var keys = Object.keys(object);
+        if (Object.getOwnPropertySymbols) {
+          var symbols = Object.getOwnPropertySymbols(object);
+          if (enumerableOnly)
+            symbols = symbols.filter(function(sym) {
+              return Object.getOwnPropertyDescriptor(object, sym).enumerable;
+            });
+          keys.push.apply(keys, symbols);
+        }
+        return keys;
+      }
+
+      function _objectSpread(target) {
+        for (var i = 1; i < arguments.length; i++) {
+          var source = arguments[i] != null ? arguments[i] : {};
+          if (i % 2) {
+            ownKeys(Object(source), true).forEach(function(key) {
+              _defineProperty(target, key, source[key]);
+            });
+          } else if (Object.getOwnPropertyDescriptors) {
+            Object.defineProperties(
+              target,
+              Object.getOwnPropertyDescriptors(source)
+            );
+          } else {
+            ownKeys(Object(source)).forEach(function(key) {
+              Object.defineProperty(
+                target,
+                key,
+                Object.getOwnPropertyDescriptor(source, key)
+              );
+            });
+          }
+        }
+        return target;
+      }
+
+      exports.__esModule = true;
+      exports.defaultHead = defaultHead;
+      exports["default"] = void 0;
+
+      var _react = _interopRequireWildcard(__webpack_require__("q1tI"));
+
+      var _sideEffect = _interopRequireDefault(__webpack_require__("BdAR"));
+
+      var _ampContext = __webpack_require__("r55Z");
+
+      var _headManagerContext = __webpack_require__("CM2u");
+
+      var _amp = __webpack_require__("dTAc");
+
+      function _interopRequireDefault(obj) {
+        return obj && obj.__esModule
+          ? obj
+          : {
+              default: obj
+            };
+      }
+
+      function _getRequireWildcardCache() {
+        if (typeof WeakMap !== "function") return null;
+        var cache = new WeakMap();
+
+        _getRequireWildcardCache = function _getRequireWildcardCache() {
+          return cache;
+        };
+
+        return cache;
+      }
+
+      function _interopRequireWildcard(obj) {
+        if (obj && obj.__esModule) {
+          return obj;
+        }
+
+        if (
+          obj === null ||
+          (typeof obj !== "object" && typeof obj !== "function")
+        ) {
+          return {
+            default: obj
+          };
+        }
+
+        var cache = _getRequireWildcardCache();
+
+        if (cache && cache.has(obj)) {
+          return cache.get(obj);
+        }
+
+        var newObj = {};
+ 
Post job cleanup.
[command]/usr/bin/git version
git version 2.32.0
[command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
[command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
[command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
http.https://github.com/.extraheader
[command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
Cleaning up orphan processes
Commit: 722b614c82babbe8c487bd3f3d16fd9991a623de

@timneutkens timneutkens merged commit e89b8e4 into canary Jul 1, 2021
@timneutkens timneutkens deleted the fix/error-loop branch July 1, 2021 11:54
leimonio added a commit to leimonio/next.js that referenced this pull request Jul 6, 2021
* [WIP] Add cms notion integration example - index page

* Add cover images for pages

* Add post page

* Remove preview functionality

* Add module.exports to security headers documentation (vercel#26466)

Without `module.exports`, the provided code won't work if just pasted into `next.config.js`

## Documentation / Examples

- [x] Make sure the linting passes

* fix: ignore invalid accept-language header (vercel#26476)



Fixes vercel#22329

## Bug

- [x] Related issues linked using fixes vercel#22329
- [x] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes

* chore: Add Alex to lint documentation (vercel#26354)

This Pull Request adds [Alex](https://alexjs.com/) to our documentation. It catches insensitive, inconsiderate writing. 

The original PR (vercel#25821) is too large so I have decided to break it down into smaller PRs. This PR is the first part. Then I will continue to add the rest of the documentation in smaller PRs.

## More Information on Alex:
https://alexjs.com/
https://github.com/get-alex/alex

## Documentation / Examples

- [x] Make sure the linting passes

* Fix domain locales not available on client (vercel#26083)

* bug: Fix domain locales not available on client

* Add test case

* update tests

Co-authored-by: JJ Kasper <[email protected]>

* Update to only add image import types when enabled (vercel#26485)

* Update to only add image import types when enabled

* add type check to test

* Update i18n fields in docs (vercel#26492)



Closes: vercel#24991

## Documentation / Examples

- [x] Make sure the linting passes

* v11.0.1-canary.7

* Strongly type `Router.events.on` and `Router.events.off` (vercel#26456)

This strongly types `Router.events.on` and `Router.events.off`. Previously the event type was `string` but now it's `'routeChangeStart' | 'beforeHistoryChange' | 'routeChangeComplete' | 'routeChangeError' | 'hashChangeStart' | 'hashChangeComplete'`


## Bug

- ~[ ] Related issues linked using `fixes #number`~
- [x] Integration tests added

Closes vercel#25679
Closes vercel#23753
Closes vercel#15497

* Update next Link & Image components

* Ensure image-types file is included (vercel#26495)

* Update react & react-dom to v17

* Update tailwind to use jit

* v11.0.1-canary.8

* v11.0.1

* Don't test image domains in test env (vercel#26502)

fixes vercel#21549

Co-authored-by: JJ Kasper <[email protected]>

* docs: updated minimum Node.js version (vercel#26528)

## Documentation / Examples

- [x] Make sure the linting passes


According to new requirements in `package.json` minimum Node.js version for now is 12.0

* Update next-env note in docs (vercel#26536)

This ensures we don't recommend editing the `next-env` file since we need to be able to tweak it to accept future types we add in Next.js


## Documentation / Examples

- [x] Make sure the linting passes

Closes: vercel#26533

* [examples] Fix ssr-caching example. (vercel#26540)

Closes vercel#12019 with a better example of proper SSR caching.

* Fix props not updating when changing the locale and keeping hash (vercel#26205)



Currently, there is only a `hashChangeStart` and subsequent `hashChangeComplete` event and no props update (which would be used to get translations, etc.).
Happy for any feedback

fixes vercel#23467

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes

* Add note about adding additional types (vercel#26545)

* Add note about adding additional types

* Update to bold edit also

* Apply suggestions from code review

Co-authored-by: Steven <[email protected]>

* Allow user to override next-image-loader (vercel#26548)

In PR vercel#26281, we solved one use case but broke another.

This PR will allow the user to [override the built-in loader](vercel#26281 (comment)) via custom webpack config.

* v11.0.2-canary.0

* chore: Enable Alex documentation linting for error pages (vercel#26526)

* Update SWR example to include fetcher function. (vercel#26520)

* Previous example doesn't work

* Apply suggestions from code review

* Update docs/basic-features/data-fetching.md

* lint-fix

Co-authored-by: Lee Robinson <[email protected]>
Co-authored-by: JJ Kasper <[email protected]>

* tailwind examps upgraded to v2.2 (vercel#26549)



## Documentation / Examples

- [x] Make sure the linting passes

* doc: prettify docs for next script (vercel#26572)



x-ref: vercel#26518 (comment)

## Documentation / Examples

- [x] Make sure the linting passes

* Add logging when a custom babelrc is loaded (vercel#26570)

Partially solves vercel#26539 by adding back the log output when a config file is used



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes

* Add comment to not edit in next-env file (vercel#26573)

This adds a comment to the generated `next-env.d.ts` to mention it should not be edited pointing to the documentation which contains an example of adding custom types separately. 

x-ref: vercel#26560

## Documentation / Examples

- [x] Make sure the linting passes

* Separate node polyfill test from basic suite (vercel#26550)

* Separate node polyfill test from basic suite

* update test

* fix with-loading example for next 11 (vercel#26569)

## Documentation / Examples

- [X] Make sure the linting passes

This PR updates the with-loading example to follow the documentation of router events for next 11

* v11.0.2-canary.1

* Add trace url on bootup (vercel#26594)

* Add trace url on bootup

* Update whitelist -> accesslist

* Add name to webpack-invalidated

* v11.0.2-canary.2

* Add check for ObjectExpression when iterating on <link> tags for font optimization (vercel#26608)

Fixes vercel#26547



## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes

* Enable Alex documentation linting for docs (vercel#26598)

* Add link to live demo already hosted (vercel#25718)

* Add link to live demo already hosted

To make it easier for people to simply see the live example without having to deploy a whole new project

* update link


Co-authored-by: JJ Kasper <[email protected]>

* Update next/image docs for relative parent with layout=fill. (vercel#26615)

vercel#18739 (reply in thread)

* Fix GSP redirect cache error (vercel#26627)

This makes sure we don't attempt flushing cache info to disk for `getStaticProps` `redirect` items with `revalidate`

Fixes: vercel#20816

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

* Correct statusCode when visiting _error directly (vercel#26610)

This fixes non-stop reloading when visiting `_error` directly in development caused by the `statusCode` being 200 unexpectedly while HMR returns the page as `invalid` which triggers `on-demand-entries` to reload the page. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

Fixes: vercel#8036
x-ref: vercel#8033

* fix: next dynamic with jest (vercel#26614)



Fixes vercel#19862

Avoid executing `webpack` property on `loadableGenerated` of loadable component compiled from `next/dynamic` when `require.resolveWeak` is unavailable due to jest runtime missing `require.resolveWeak`.

## Bug

- [x] Related issues linked using `fixes #number`
- [x] unit tests added

* Ensure API routes are not available under the locale (vercel#26629)

This ensures API routes are not available under the locale path since API routes don't need to be localized and we don't provide the locale to the API in any way currently so the user wouldn't be aware if the localized API route was visited instead of the non-localized. 

Fixes: vercel#25790

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

* v11.0.2-canary.3

* Fix image content type octet stream 400 (vercel#26705)

Fixes vercel#23523 by adding image content type detection

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

* Update layouts example to persist state across client-side transitions. (vercel#26706)

* Update layouts example

* Update examples/layout-component/components/layout.js

Co-authored-by: JJ Kasper <[email protected]>

* Fix typo on "occured" to "occurred" (vercel#26709)

* fix: typo occured -> occurred

* fix: typo occured -> occurred

* fix: typo occured -> occurred

* fix: typo occured -> occurred

* lint-fix


Co-authored-by: JJ Kasper <[email protected]>

* [ESLint] Adds --max-warnings flag to `next lint` (vercel#26697)

Adds `--max-warnings` flag to `next lint` to enable setting of a maximum warning threshold.

Fixes vercel#26671

* update with-redux-toolkit-typescript (vercel#26714)



## Bug

- [X] Related issues linked using `fixes vercel#26713 `

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [X] Make sure the linting passes

## Screenshots

After this small change the warning disappears.
![image](https://user-images.githubusercontent.com/47717492/123749377-fd56fb80-d8d2-11eb-8b70-dbb7f6f16050.png)

* Simplify `next-dev-server` implementation (vercel#26230)

`next-dev-server` having its own implementations of `renderToHTML` and `renderErrorToHTML` has historically made reasoning about streaming hard, as it adds additional places where status codes are explicitly set and the full HTML is blocked on.

Instead, this PR simplifies things considerably by moving the majority of the custom logic for e.g. hot reloading and on-demand compilation to when we're resolving the page to be loaded, rather than upfront when handling the request. It also cleans up a few other details (e.g. default error page rendering) that managed to creep into the base implementation over time.

One unfortunate side effect is that this makes compilation errors slightly more difficult. Previously, we'd render them directly. Now, we have to rethrow them. But since they've already been logged (by the watch pipeline), we have to make sure they don't get logged again.

* Update PR labeler action

* Simplify stats action (vercel#26751)

* Move code shared between server/client to "shared" folder (vercel#26734)

* Move next-server directory files to server directory (vercel#26756)

* Move next-server directory files to server directory

* Update tests

* Update paths in other places

* Support new hydrate API in latest react 18 alpha release (vercel#26664)

* fix: react 18 new hydration API

* support react 18

* compat latest react only, fix resolved version

* fix tests

* Some changes based on reactwg/react-18#5

* fix test

Co-authored-by: Tim Neutkens <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Disable build-output size specific tests (vercel#26769)

* Disable build-output size specific tests

* remove size-limit test

* lint-fix

* Add upstream `max-age` to optimized image (vercel#26739)

This solves the main use case from Issue vercel#19914.

Previously, we would set the `Cache-Control` header to a constant and rely on the server cache. This would mean the browser would always request the image and the server could response with 304 Not Modified to omit the response body.

This PR changes the behavior such that the `max-age` will propagate from the upstream server to the Next.js Image Optimization Server and allow browser caching. ("upstream" meaning external server or just an internal route to an image)

This PR does not change the `max-age` for static imports which will remain `public, max-age=315360000, immutable`.

#### Pros:
- Fewer HTTP requests after initial browser visit
- User configurable `max-age` via the upstream image `Cache-Control` header

#### Cons:
- ~~Might be annoying for `next dev` when modifying a source image~~ (solved: use `max-age=0` for dev)
- Might cause browser to cache longer than expected (up to 2x longer than the server cache if requested in the last second before expiration)

## Bug

- [x] Related issues linked using `fixes #number`

* Fix blurred image position when using objectPosition (vercel#26590)



## Bug

fixes vercel#26309

## Documentation / Examples

see vercel#26309

- [ ] Make sure the linting passes

* Update azure tests (vercel#26779)

* Stabilize relay-analytics test (vercel#26782)

* Leverage blocked page for _error (vercel#26748)



## Enhance

simplify detection for visiting `_error`

x-ref: vercel#26610

* Update codeowners to add new maintainers (vercel#26770)

* examples: fix typo `lunix` → `linux` (vercel#26796)



## Bug

- [ ] ~~Related issues linked using `fixes #number`~~
- [ ] ~~Integration tests added~~

## Feature

- [ ] ~~Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.~~
- [ ] ~~Related issues linked using `fixes #number`~~
- [ ] ~~Integration tests added~~
- [ ] ~~Documentation added~~
- [ ] ~~Telemetry added. In case of a feature if it's used or not.~~

## Documentation / Examples

- [x] Make sure the linting passes

* Update repo scripts to separate folder (vercel#26787)

* fix: detect loop in client error page (vercel#26567)

Co-authored-by: Tobias Koppers <[email protected]>
Co-authored-by: Tim Neutkens <[email protected]>

* Update snapshot for font-optimization test (vercel#26823)

This fixes the `font-optimization` test failing from the links/content changing slightly in the snapshot. 

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes

* Add `onLoadingComplete()` prop to Image component (vercel#26824)

This adds a new prop, `onLoadingComplete()`, to handle the most common use case of `ref`.

I also added docs and a warning when using `ref` so we recommend the new prop instead.
 
- Fixes vercel#18398 
- Fixes vercel#22482

* Add "Vary: Accept" header to /_next/image responses (vercel#26788)

This pull request adds "Vary: Accept" header to responses from the image optimizer (i.e. the /_next/image endpoint).

The image optimizer prefers re-encoding JPG files to WebP, but some browsers (such as Safari 14 on Catalina) do not yet support WebP. In such cases the optimizer uses the Accept header sent by the browser to send out a JPG response. Thus the optimizer's response may depend on the Accept header.

Potential caching proxies can be informed of this fact by adding "Vary: Accept" to the response headers. Otherwise WebP data may be served to browsers that do not support it, for example in the following scenario:
 * A browser that supports WebP requests the JPG. The optimizer re-encodes it to WebP. The proxy caches the WebP data.
 * After this another browser that doesn't support WebP requests the JPG. The proxy sends the WebP data to the browser.

- [x] Integration tests added
- [x] Make sure the linting passes

* Fix using-preact example deps (vercel#26821)

Fix after vercel#26133

* Add additional tests for image type detection (vercel#26832)

Adding additional tests. Follow up to vercel#26705

* Fix immutable header for image with static import & unoptimized (vercel#26836)

Fixes vercel#26587

* Update `publish-canary` script to include checkout (vercel#26840)

* Update `publish-canary` script to include checkout

* Update contrib with publishing section

* v11.0.2-canary.4

* Make sure 404 pages do not get cached by a CDN when using next start (vercel#24983)

Co-authored-by: Jiachi Liu <[email protected]>
Co-authored-by: JJ Kasper <[email protected]>

* Update to environment-variable.md (vercel#26863)



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes

## Why the change
I lost quite a few hours figuring out why my environment variable was `undefined` in the browser.
I read about the built-in support and was like: "Oh nice" and didn't read much further. I missed the part about how you need to prefix your variables with `NEXT_PUBLIC_` in order to expose them to the browser.
I think a hint to this in the anchor link to that section will make it more discoverable as it's then mentioned near the top and will save people who are like me some time and a headache.

* Don't emit duplicate image files (vercel#26843)

fixes vercel#26607

This change makes it so the image loader plugin only emits a file while processing an image import for the client. The final generated image URL was already the same in SSR and CSR anyway, so this change doesn't have any functional impact.

I also changed the name of the static page in the image component tests, since it was causing some conflicts with the static assets folder.

* Add instructions on how to add nextjs.org/docs/messages urls (vercel#26865)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Rename example folder to with-notion

* Update references of example

* Reorder docs manifest and rename to Script Optimization. (vercel#26874)

So there's _conformance_ between the other docs / optimizations.

* Fix typo on "occured" to "occurred" (vercel#26876)

- Fix typo on "occured" to "occurred"

* Update README

Co-authored-by: Sam Robbins <[email protected]>
Co-authored-by: Jiachi Liu <[email protected]>
Co-authored-by: Peter Mekhaeil <[email protected]>
Co-authored-by: Rob Vermeer <[email protected]>
Co-authored-by: JJ Kasper <[email protected]>
Co-authored-by: Brandon Bayer <[email protected]>
Co-authored-by: Alex Castle <[email protected]>
Co-authored-by: Vitaly Baev <[email protected]>
Co-authored-by: Lee Robinson <[email protected]>
Co-authored-by: destruc7i0n <[email protected]>
Co-authored-by: Steven <[email protected]>
Co-authored-by: Joshua Byrd <[email protected]>
Co-authored-by: Pranav P <[email protected]>
Co-authored-by: Tim Neutkens <[email protected]>
Co-authored-by: John <[email protected]>
Co-authored-by: Tim Neutkens <[email protected]>
Co-authored-by: Vadorequest <[email protected]>
Co-authored-by: hiro <[email protected]>
Co-authored-by: Houssein Djirdeh <[email protected]>
Co-authored-by: Soham Shah <[email protected]>
Co-authored-by: Gerald Monaco <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Nils Schönwald <[email protected]>
Co-authored-by: D. Kasi Pavan Kumar <[email protected]>
Co-authored-by: Tobias Koppers <[email protected]>
Co-authored-by: Joachim Viide <[email protected]>
Co-authored-by: Artur Sedlukha <[email protected]>
Co-authored-by: Paul van den Dool <[email protected]>
Co-authored-by: hiro <[email protected]>
flybayer pushed a commit to blitz-js/next.js that referenced this pull request Aug 19, 2021
Co-authored-by: Tobias Koppers <[email protected]>
Co-authored-by: Tim Neutkens <[email protected]>
@vercel vercel locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Endless loop when _error render throws on client side
4 participants