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

misc: add internal lint rule against usage of typeof window #40614

Closed
wants to merge 6 commits into from

Conversation

feedthejim
Copy link
Contributor

@feedthejim feedthejim commented Sep 16, 2022

Context:

In the next codebase, for the server bundle, doing typeof window === 'undefined' for dead code elimination (DCE) does not work because the transform that would convert typeof window !== 'undefined' to true and allow for DCE is only applied to the client-side code.

This wasn't relevant before because the server bundle size wasn't that relevant but because of the edge runtime sensitivity to bundle size, we need to be more careful.

This PR

This adds:

  • a new private package to hold our private lint rules
  • a new lint rule to forbit the usage of typeof window === undefined and all of its variant
  • tests
  • an autofixer that suggests the usage of process.env.browser process.env.NEXT_RUNTIME, something which is correctly transformed by webpack
  • fixes for the usages in the code

EDIT: I went with NEXT_RUNTIME in the end, which only exists on the server. browser had issue because it's encoded as a stringified boolean. This allows to write if (!process.env.NEXT_RUNTIME) instead of if(process.env.browser === 'false')

Bug

  • Related issues linked using fixes #number
  • Integration tests added
  • Errors have helpful link attached, see contributing.md

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.
  • Errors have helpful link attached, see contributing.md

Documentation / Examples

  • Make sure the linting passes by running pnpm lint
  • The examples guidelines are followed from our contributing doc

@ijjk
Copy link
Member

ijjk commented Sep 16, 2022

Failing test suites

Commit: 6341a66

pnpm testheadless test/integration/app-document-import-order/test/index.test.js

  • Root components import order > root components should be imported in this order _document > _app > page in order to respect side effects
  • Root components import order > _app chunks should be attached to de dom before page chunks
  • Root components import order > on dev server > root components should be imported in this order _document > _app > page in order to respect side effects
  • Root components import order > on dev server > _app chunks should be attached to de dom before page chunks
Expand output

● Root components import order › root components should be imported in this order _document > _app > page in order to respect side effects

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Root components import order › _app chunks should be attached to de dom before page chunks

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Root components import order › on dev server › root components should be imported in this order _document > _app > page in order to respect side effects

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Root components import order › on dev server › _app chunks should be attached to de dom before page chunks

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

TypeError: Cannot read properties of undefined (reading '__app')

  445 |
  446 | export async function stopApp(server) {
> 447 |   if (server.__app) {
      |              ^
  448 |     await server.__app.close()
  449 |   }
  450 |   await promiseCall(server, 'close')

  at stopApp (lib/next-test-utils.js:447:14)
  at integration/app-document-import-order/test/index.test.js:33:25

Read more about building and testing Next.js in contributing.md.

pnpm testheadless test/integration/app-document-style-fragment/test/index.test.js

  • Custom Document Fragment Styles > correctly adds styles from fragment styles key
Expand output

● Custom Document Fragment Styles › correctly adds styles from fragment styles key

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

TypeError: Cannot read properties of undefined (reading '__app')

  445 |
  446 | export async function stopApp(server) {
> 447 |   if (server.__app) {
      |              ^
  448 |     await server.__app.close()
  449 |   }
  450 |   await promiseCall(server, 'close')

  at stopApp (lib/next-test-utils.js:447:14)
  at integration/app-document-style-fragment/test/index.test.js:30:25

Read more about building and testing Next.js in contributing.md.

pnpm testheadless test/integration/future/test/index.test.js

  • excludeDefaultMomentLocales > should load momentjs
Expand output

● excludeDefaultMomentLocales › should load momentjs

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

TypeError: Cannot read properties of undefined (reading '__app')

  445 |
  446 | export async function stopApp(server) {
> 447 |   if (server.__app) {
      |              ^
  448 |     await server.__app.close()
  449 |   }
  450 |   await promiseCall(server, 'close')

  at stopApp (lib/next-test-utils.js:447:14)
  at integration/future/test/index.test.js:30:25

Read more about building and testing Next.js in contributing.md.

pnpm testheadless test/integration/disable-js-preload/test/index.test.js

  • disabled JS preloads > production mode > should render the page
  • disabled JS preloads > production mode > should not have JS preload links
Expand output

● disabled JS preloads › production mode › should render the page

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● disabled JS preloads › production mode › should not have JS preload links

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

TypeError: Cannot read properties of undefined (reading '__app')

  445 |
  446 | export async function stopApp(server) {
> 447 |   if (server.__app) {
      |              ^
  448 |     await server.__app.close()
  449 |   }
  450 |   await promiseCall(server, 'close')

  at stopApp (lib/next-test-utils.js:447:14)
  at integration/disable-js-preload/test/index.test.js:36:27

Read more about building and testing Next.js in contributing.md.

pnpm testheadless test/integration/disable-js/test/index.test.js

  • disabled runtime JS > production mode > should render the page
  • disabled runtime JS > production mode > should not have NEXT_DATA script
  • disabled runtime JS > production mode > should not have scripts
  • disabled runtime JS > production mode > should not have preload links
Expand output

● disabled runtime JS › production mode › should render the page

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● disabled runtime JS › production mode › should not have NEXT_DATA script

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● disabled runtime JS › production mode › should not have scripts

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● disabled runtime JS › production mode › should not have preload links

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

TypeError: Cannot read properties of undefined (reading '__app')

  445 |
  446 | export async function stopApp(server) {
> 447 |   if (server.__app) {
      |              ^
  448 |     await server.__app.close()
  449 |   }
  450 |   await promiseCall(server, 'close')

  at stopApp (lib/next-test-utils.js:447:14)
  at integration/disable-js/test/index.test.js:36:27

Read more about building and testing Next.js in contributing.md.

pnpm testheadless test/integration/getserversideprops-preview/test/index.test.js

  • ServerSide Props Preview Mode > Emulated Serverless Mode > should return page on first request
  • ServerSide Props Preview Mode > Emulated Serverless Mode > should return page on second request
  • ServerSide Props Preview Mode > Emulated Serverless Mode > should enable preview mode
  • ServerSide Props Preview Mode > Emulated Serverless Mode > should not return fallback page on preview request
  • ServerSide Props Preview Mode > Emulated Serverless Mode > should return correct caching headers for data preview request
  • ServerSide Props Preview Mode > Emulated Serverless Mode > should return cookies to be expired on reset request
  • ServerSide Props Preview Mode > Emulated Serverless Mode > should throw error when setting too large of preview data
Expand output

● ServerSide Props Preview Mode › Emulated Serverless Mode › should return page on first request

FetchError: request to http://localhost:33571/ failed, reason: socket hang up

  at ClientRequest.<anonymous> (../node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/lib/index.js:1491:11)

● ServerSide Props Preview Mode › Emulated Serverless Mode › should return page on second request

FetchError: request to http://localhost:33571/ failed, reason: connect ECONNREFUSED 127.0.0.1:33571

  at ClientRequest.<anonymous> (../node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/lib/index.js:1491:11)

● ServerSide Props Preview Mode › Emulated Serverless Mode › should enable preview mode

FetchError: request to http://localhost:33571/api/preview?lets=goooo failed, reason: connect ECONNREFUSED 127.0.0.1:33571

  at ClientRequest.<anonymous> (../node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/lib/index.js:1491:11)

● ServerSide Props Preview Mode › Emulated Serverless Mode › should not return fallback page on preview request

FetchError: request to http://localhost:33571/? failed, reason: connect ECONNREFUSED 127.0.0.1:33571

  at ClientRequest.<anonymous> (../node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/lib/index.js:1491:11)

● ServerSide Props Preview Mode › Emulated Serverless Mode › should return correct caching headers for data preview request

FetchError: request to http://localhost:33571/_next/data/4OcKfV1wsmwF2j9bDx2dk/index.json? failed, reason: connect ECONNREFUSED 127.0.0.1:33571

  at ClientRequest.<anonymous> (../node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/lib/index.js:1491:11)

● ServerSide Props Preview Mode › Emulated Serverless Mode › should return cookies to be expired on reset request

FetchError: request to http://localhost:33571/api/reset? failed, reason: connect ECONNREFUSED 127.0.0.1:33571

  at ClientRequest.<anonymous> (../node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/lib/index.js:1491:11)

● ServerSide Props Preview Mode › Emulated Serverless Mode › should throw error when setting too large of preview data

FetchError: request to http://localhost:33571/api/preview?tooBig=true failed, reason: connect ECONNREFUSED 127.0.0.1:33571

  at ClientRequest.<anonymous> (../node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/lib/index.js:1491:11)

Read more about building and testing Next.js in contributing.md.

pnpm testheadless test/integration/legacy-pkg-gently/test/index.test.js

  • Legacy Packages > should support node-gently packages
Expand output

● Legacy Packages › should support node-gently packages

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

TypeError: Cannot read properties of undefined (reading '__app')

  445 |
  446 | export async function stopApp(server) {
> 447 |   if (server.__app) {
      |              ^
  448 |     await server.__app.close()
  449 |   }
  450 |   await promiseCall(server, 'close')

  at stopApp (lib/next-test-utils.js:447:14)
  at integration/legacy-pkg-gently/test/index.test.js:36:25

Read more about building and testing Next.js in contributing.md.

pnpm testheadless test/integration/filesystempublicroutes/test/index.test.js

  • FileSystemPublicRoutes > should not route to the index page
  • FileSystemPublicRoutes > should route to exportPathMap defined routes in development
  • FileSystemPublicRoutes > should still handle /_next routes
  • FileSystemPublicRoutes > should route to public folder files
Expand output

● FileSystemPublicRoutes › should not route to the index page

thrown: "Exceeded timeout of 90000 ms for a hook.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

  25 |
  26 | describe('FileSystemPublicRoutes', () => {
> 27 |   beforeAll(() => startServer())
     |   ^
  28 |   afterAll(() => killApp(server))
  29 |
  30 |   const fetch = (p, q) => fetchViaHTTP(context.appPort, p, q)

  at integration/filesystempublicroutes/test/index.test.js:27:3
  at Object.<anonymous> (integration/filesystempublicroutes/test/index.test.js:26:1)

● FileSystemPublicRoutes › should route to exportPathMap defined routes in development

thrown: "Exceeded timeout of 90000 ms for a hook.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

  25 |
  26 | describe('FileSystemPublicRoutes', () => {
> 27 |   beforeAll(() => startServer())
     |   ^
  28 |   afterAll(() => killApp(server))
  29 |
  30 |   const fetch = (p, q) => fetchViaHTTP(context.appPort, p, q)

  at integration/filesystempublicroutes/test/index.test.js:27:3
  at Object.<anonymous> (integration/filesystempublicroutes/test/index.test.js:26:1)

● FileSystemPublicRoutes › should still handle /_next routes

thrown: "Exceeded timeout of 90000 ms for a hook.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

  25 |
  26 | describe('FileSystemPublicRoutes', () => {
> 27 |   beforeAll(() => startServer())
     |   ^
  28 |   afterAll(() => killApp(server))
  29 |
  30 |   const fetch = (p, q) => fetchViaHTTP(context.appPort, p, q)

  at integration/filesystempublicroutes/test/index.test.js:27:3
  at Object.<anonymous> (integration/filesystempublicroutes/test/index.test.js:26:1)

● FileSystemPublicRoutes › should route to public folder files

thrown: "Exceeded timeout of 90000 ms for a hook.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

  25 |
  26 | describe('FileSystemPublicRoutes', () => {
> 27 |   beforeAll(() => startServer())
     |   ^
  28 |   afterAll(() => killApp(server))
  29 |
  30 |   const fetch = (p, q) => fetchViaHTTP(context.appPort, p, q)

  at integration/filesystempublicroutes/test/index.test.js:27:3
  at Object.<anonymous> (integration/filesystempublicroutes/test/index.test.js:26:1)

● Test suite failed to run

TypeError: Cannot read properties of undefined (reading 'pid')

  424 | // Kill a launched app
  425 | export async function killApp(instance) {
> 426 |   await killProcess(instance.pid)
      |                              ^
  427 | }
  428 |
  429 | export async function startApp(app) {

  at killApp (lib/next-test-utils.js:426:30)
  at integration/filesystempublicroutes/test/index.test.js:28:25

Read more about building and testing Next.js in contributing.md.

pnpm testheadless test/integration/render-error-on-module-error/test/index.test.js

  • Module Init Error > should render error page
Expand output

● Module Init Error › should render error page

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

TypeError: Cannot read properties of undefined (reading '__app')

  445 |
  446 | export async function stopApp(server) {
> 447 |   if (server.__app) {
      |              ^
  448 |     await server.__app.close()
  449 |   }
  450 |   await promiseCall(server, 'close')

  at stopApp (lib/next-test-utils.js:447:14)
  at integration/render-error-on-module-error/test/index.test.js:31:25

Read more about building and testing Next.js in contributing.md.

pnpm testheadless test/integration/production-build-dir/test/index.test.js

  • Production Custom Build Directory > With basic usage > should render the page
Expand output

● Production Custom Build Directory › With basic usage › should render the page

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Production Custom Build Directory › With basic usage › should render the page

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

Read more about building and testing Next.js in contributing.md.

pnpm testheadless test/integration/api-body-parser/test/index.test.js

  • should not throw if request body is already parsed in custom middleware

  • should not throw if request's content-type is invalid

Expand output

● should not throw if request body is already parsed in custom middleware

thrown: "Exceeded timeout of 90000 ms for a test.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

  28 |   })
  29 |
> 30 |   it('should not throw if request body is already parsed in custom middleware', async () => {
     |   ^
  31 |     await startServer()
  32 |     const data = await makeRequest()
  33 |     expect(data).toEqual([{ title: 'Nextjs' }])

  at runTests (integration/api-body-parser/test/index.test.js:30:3)
  at Object.<anonymous> (integration/api-body-parser/test/index.test.js:83:1)
  at TestScheduler.scheduleTests (../node_modules/.pnpm/@jest+core@27.0.6_node-notifier@8.0.1/node_modules/@jest/core/build/TestScheduler.js:333:13)

● should not throw if request's content-type is invalid

thrown: "Exceeded timeout of 90000 ms for a test.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

  35 |   })
  36 |
> 37 |   it("should not throw if request's content-type is invalid", async () => {
     |   ^
  38 |     await startServer()
  39 |     const status = await makeRequestWithInvalidContentType()
  40 |     expect(status).toBe(200)

  at runTests (integration/api-body-parser/test/index.test.js:37:3)
  at Object.<anonymous> (integration/api-body-parser/test/index.test.js:83:1)
  at TestScheduler.scheduleTests (../node_modules/.pnpm/@jest+core@27.0.6_node-notifier@8.0.1/node_modules/@jest/core/build/TestScheduler.js:333:13)

Read more about building and testing Next.js in contributing.md.

pnpm testheadless test/integration/route-load-cancel/test/index.test.js

  • next/dynamic > production mode > should cancel slow page loads on re-navigation
Expand output

● next/dynamic › production mode › should cancel slow page loads on re-navigation

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.

ReferenceError: window is not defined

  298 |
  299 | if (!process.env.NEXT_RUNTIME) {
> 300 |   window.__NEXT_PRELOADREADY = Loadable.preloadReady
      |   ^
  301 | }
  302 |
  303 | export default Loadable

  at Object.<anonymous> (../packages/next/shared/lib/loadable.js:300:3)
  at Object.<anonymous> (../packages/next/server/render.tsx:54:46)

● Test suite failed to run

TypeError: Cannot read properties of undefined (reading '__app')

  445 |
  446 | export async function stopApp(server) {
> 447 |   if (server.__app) {
      |              ^
  448 |     await server.__app.close()
  449 |   }
  450 |   await promiseCall(server, 'close')

  at stopApp (lib/next-test-utils.js:447:14)
  at integration/route-load-cancel/test/index.test.js:61:27

Read more about building and testing Next.js in contributing.md.

pnpm testheadless test/production/minimal-mode-response-cache/index.test.ts

  • minimal-mode-response-cache > should have correct responses
Expand output

● minimal-mode-response-cache › should have correct responses

thrown: "Exceeded timeout of 240000 ms for a hook.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

  17 |   let appPort
  18 |
> 19 |   beforeAll(async () => {
     |   ^
  20 |     // test build against environment with next support
  21 |     process.env.NOW_BUILDER = '1'
  22 |

  at production/minimal-mode-response-cache/index.test.ts:19:3
  at Object.<anonymous> (production/minimal-mode-response-cache/index.test.ts:14:1)

Read more about building and testing Next.js in contributing.md.

pnpm testheadless test/production/pnpm-support/test/index.test.ts

  • pnpm support > should execute client-side JS on each page in output: "standalone"
Expand output

● pnpm support › should execute client-side JS on each page in output: "standalone"

thrown: "Exceeded timeout of 240000 ms for a test.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

  46 |   })
  47 |
> 48 |   it('should execute client-side JS on each page in output: "standalone"', async () => {
     |   ^
  49 |     next = await createNext({
  50 |       files: {
  51 |         pages: new FileRef(path.join(__dirname, '..', 'app-multi-page/pages')),

  at production/pnpm-support/test/index.test.ts:48:3
  at Object.<anonymous> (production/pnpm-support/test/index.test.ts:14:1)

Read more about building and testing Next.js in contributing.md.

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

  • Font Optimization > with-google > Font optimization for emulated serverless apps > should only inline included fonts per page
  • Font Optimization > with-google > Font optimization for emulated serverless apps > should inline the google fonts for SSR pages
  • Font Optimization > with-google > Font optimization for emulated serverless apps > should add preconnect tag
  • Font Optimization > with-google > Font optimization for emulated serverless apps > should work for fonts loaded on navigation
  • Font Optimization > with-typekit > Font optimization for emulated serverless apps > should only inline included fonts per page
  • Font Optimization > with-typekit > Font optimization for emulated serverless apps > should inline the typekit fonts for SSR pages
  • Font Optimization > with-typekit > Font optimization for emulated serverless apps > should add preconnect tag
  • Font Optimization > with-typekit > Font optimization for emulated serverless apps > should work for fonts loaded on navigation
Expand output

● Font Optimization › with-google › Font optimization for emulated serverless apps › should only inline included fonts per page

expect(received).toMatch(expected)

Expected pattern: /<style data-href="https:\/\/fonts.googleapis.com\/css2\?family=Roboto:wght@400;700;900&display=swap">.*<\/style>/
Received string:  "FAIL_FUNCTION"

  111 |           expect($(`link[data-href="${withFont}"]`).length).toBe(0)
  112 |
> 113 |           expect(html).toMatch(withFontPattern)
      |                        ^
  114 |
  115 |           const htmlWithoutFont = await renderViaHTTP(appPort, '/without-font')
  116 |           const $2 = cheerio.load(htmlWithoutFont)

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

● Font Optimization › with-google › Font optimization for emulated serverless apps › should inline the google fonts for SSR pages

expect(received).toMatch(expected)

Expected pattern: /<style data-href="https:\/\/fonts\.googleapis\.com\/css2\?family=Roboto:wght@700">.*<\/style>/
Received string:  "FAIL_FUNCTION"

  147 |             $(`link[rel=stylesheet][data-href="${starsFont}"]`).length
  148 |           ).toBe(0)
> 149 |           expect(html).toMatch(starsPattern)
      |                        ^
  150 |         })
  151 |
  152 |         it(`should add preconnect tag`, async () => {

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

● Font Optimization › with-google › Font optimization for emulated serverless apps › should add preconnect tag

expect(received).toBe(expected) // Object.is equality

Expected: 1
Received: 0

  155 |           expect(
  156 |             $(`link[rel=preconnect][href="${preconnectUrl}"]`).length
> 157 |           ).toBe(1)
      |             ^
  158 |         })
  159 |
  160 |         it('should skip this optimization for AMP pages', async () => {

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

● Font Optimization › with-google › Font optimization for emulated serverless apps › should work for fonts loaded on navigation

page.waitForSelector: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for selector "#with-font-container"
============================================================

  322 |     return this.chain(() => {
  323 |       return page
> 324 |         .waitForSelector(selector, { timeout, state: 'attached' })
      |          ^
  325 |         .then(async (el) => {
  326 |           // it seems selenium waits longer and tests rely on this behavior
  327 |           // so we wait for the load event fire before returning

  at lib/browsers/playwright.ts:324:10

● Font Optimization › with-typekit › Font optimization for emulated serverless apps › should only inline included fonts per page

expect(received).toMatch(expected)

Expected pattern: /<style data-href="https:\/\/use.typekit.net\/ucs7mcf.css">.*<\/style>/
Received string:  "FAIL_FUNCTION"

  111 |           expect($(`link[data-href="${withFont}"]`).length).toBe(0)
  112 |
> 113 |           expect(html).toMatch(withFontPattern)
      |                        ^
  114 |
  115 |           const htmlWithoutFont = await renderViaHTTP(appPort, '/without-font')
  116 |           const $2 = cheerio.load(htmlWithoutFont)

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

● Font Optimization › with-typekit › Font optimization for emulated serverless apps › should inline the typekit fonts for SSR pages

expect(received).toMatch(expected)

Expected pattern: /<style data-href="https:\/\/use.typekit.net\/ucs7mcf.css">.*<\/style>/
Received string:  "FAIL_FUNCTION"

  147 |             $(`link[rel=stylesheet][data-href="${starsFont}"]`).length
  148 |           ).toBe(0)
> 149 |           expect(html).toMatch(starsPattern)
      |                        ^
  150 |         })
  151 |
  152 |         it(`should add preconnect tag`, async () => {

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

● Font Optimization › with-typekit › Font optimization for emulated serverless apps › should add preconnect tag

expect(received).toBe(expected) // Object.is equality

Expected: 1
Received: 0

  155 |           expect(
  156 |             $(`link[rel=preconnect][href="${preconnectUrl}"]`).length
> 157 |           ).toBe(1)
      |             ^
  158 |         })
  159 |
  160 |         it('should skip this optimization for AMP pages', async () => {

  at Object.<anonymous> (integration/font-optimization/test/index.test.js:157:13)
      at runMicrotasks (<anonymous>)

● Font Optimization › with-typekit › Font optimization for emulated serverless apps › should work for fonts loaded on navigation

page.waitForSelector: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for selector "#with-font-container"
============================================================

  322 |     return this.chain(() => {
  323 |       return page
> 324 |         .waitForSelector(selector, { timeout, state: 'attached' })
      |          ^
  325 |         .then(async (el) => {
  326 |           // it seems selenium waits longer and tests rely on this behavior
  327 |           // so we wait for the load event fire before returning

  at lib/browsers/playwright.ts:324:10

Read more about building and testing Next.js in contributing.md.

pnpm testheadless test/e2e/streaming-ssr/index.test.ts

  • react 18 streaming SSR with custom server > should render page correctly under custom server
Expand output

● react 18 streaming SSR with custom server › should render page correctly under custom server

thrown: "Exceeded timeout of 240000 ms for a hook.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

  72 |     let server
  73 |     let appPort
> 74 |     beforeAll(async () => {
     |     ^
  75 |       next = await createNext({
  76 |         files: {
  77 |           pages: new FileRef(join(__dirname, 'custom-server/pages')),

  at e2e/streaming-ssr/index.test.ts:74:5
  at Object.<anonymous> (e2e/streaming-ssr/index.test.ts:70:3)

Read more about building and testing Next.js in contributing.md.

shuding
shuding previously approved these changes Sep 16, 2022
@feedthejim feedthejim marked this pull request as draft September 16, 2022 15:19
@ijjk
Copy link
Member

ijjk commented Sep 16, 2022

Stats from current PR

Default Build (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary feedthejim/next.js replace-typeof-window Change
buildDuration 23.3s 22s -1.3s
buildDurationCached 7.6s 7.7s ⚠️ +48ms
nodeModulesSize 74.8 MB 74.8 MB ⚠️ +628 B
nextStartRea..uration (ms) 294ms 293ms -1ms
nextDevReadyDuration 317ms 316ms -1ms
Page Load Tests Overall increase ✓
vercel/next.js canary feedthejim/next.js replace-typeof-window Change
/ failed reqs 0 0
/ total time (seconds) 9.264 9.238 -0.03
/ avg req/sec 269.87 270.63 +0.76
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 6.295 6.304 ⚠️ +0.01
/error-in-render avg req/sec 397.11 396.59 ⚠️ -0.52
Client Bundles (main, webpack) Overall increase ⚠️
vercel/next.js canary feedthejim/next.js replace-typeof-window Change
900.HASH.js gzip 179 B 179 B
framework-HASH.js gzip 45.3 kB 45.3 kB
main-HASH.js gzip 30.9 kB 31.6 kB ⚠️ +758 B
webpack-HASH.js gzip 1.54 kB 1.6 kB ⚠️ +66 B
Overall change 77.8 kB 78.7 kB ⚠️ +824 B
Legacy Client Bundles (polyfills)
vercel/next.js canary feedthejim/next.js replace-typeof-window Change
polyfills-HASH.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages Overall increase ⚠️
vercel/next.js canary feedthejim/next.js replace-typeof-window Change
_app-HASH.js gzip 201 B 202 B ⚠️ +1 B
_error-HASH.js gzip 195 B 195 B
amp-HASH.js gzip 492 B 493 B ⚠️ +1 B
css-HASH.js gzip 327 B 329 B ⚠️ +2 B
dynamic-HASH.js gzip 2.03 kB 2.08 kB ⚠️ +46 B
edge-ssr-HASH.js gzip 288 B 287 B -1 B
head-HASH.js gzip 356 B 355 B -1 B
hooks-HASH.js gzip 800 B 800 B
image-HASH.js gzip 4.87 kB 4.87 kB -5 B
index-HASH.js gzip 261 B 263 B ⚠️ +2 B
link-HASH.js gzip 2.37 kB 2.36 kB -3 B
routerDirect..HASH.js gzip 322 B 321 B -1 B
script-HASH.js gzip 392 B 391 B -1 B
withRouter-HASH.js gzip 320 B 321 B ⚠️ +1 B
85e02e95b279..7e3.css gzip 107 B 107 B
Overall change 13.3 kB 13.4 kB ⚠️ +41 B
Client Build Manifests Overall decrease ✓
vercel/next.js canary feedthejim/next.js replace-typeof-window Change
_buildManifest.js gzip 484 B 483 B -1 B
Overall change 484 B 483 B -1 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary feedthejim/next.js replace-typeof-window Change
index.html gzip 511 B 512 B ⚠️ +1 B
link.html gzip 526 B 527 B ⚠️ +1 B
withRouter.html gzip 506 B 506 B
Overall change 1.54 kB 1.54 kB ⚠️ +2 B
Edge SSR Page bundle Size Overall decrease ✓
vercel/next.js canary feedthejim/next.js replace-typeof-window Change
edge-ssr.js gzip 116 kB 116 kB -10 B
Overall change 116 kB 116 kB -10 B
Middleware size Overall decrease ✓
vercel/next.js canary feedthejim/next.js replace-typeof-window Change
middleware-b..fest.js gzip 578 B 574 B -4 B
middleware-r..fest.js gzip 145 B 145 B
middleware.js gzip 18.8 kB 18.8 kB -10 B
edge-runtime..pack.js gzip 1.83 kB 1.83 kB
Overall change 21.3 kB 21.3 kB -14 B

Diffs

Diff for middleware-b..-manifest.js
@@ -9,89 +9,89 @@ self.__BUILD_MANIFEST = {
   rootMainFiles: [],
   pages: {
     "/": [
-      "static/chunks/webpack-596ddb9e5090dbce.js",
+      "static/chunks/webpack-6c2d1170b2a43789.js",
       "static/chunks/framework-0249bf7bc1c3f377.js",
-      "static/chunks/main-439b59a3d598c416.js",
-      "static/chunks/pages/index-eff379b6d5b9bb68.js"
+      "static/chunks/main-dcba0176d4e7d6c0.js",
+      "static/chunks/pages/index-2d083d34263a3ab6.js"
     ],
     "/_app": [
-      "static/chunks/webpack-596ddb9e5090dbce.js",
+      "static/chunks/webpack-6c2d1170b2a43789.js",
       "static/chunks/framework-0249bf7bc1c3f377.js",
-      "static/chunks/main-439b59a3d598c416.js",
-      "static/chunks/pages/_app-92c368fd6cf3735d.js"
+      "static/chunks/main-dcba0176d4e7d6c0.js",
+      "static/chunks/pages/_app-dfaef6942d774f42.js"
     ],
     "/_error": [
-      "static/chunks/webpack-596ddb9e5090dbce.js",
+      "static/chunks/webpack-6c2d1170b2a43789.js",
       "static/chunks/framework-0249bf7bc1c3f377.js",
-      "static/chunks/main-439b59a3d598c416.js",
-      "static/chunks/pages/_error-178a994c6aae5c09.js"
+      "static/chunks/main-dcba0176d4e7d6c0.js",
+      "static/chunks/pages/_error-d3adcea7db63be0b.js"
     ],
     "/amp": [
-      "static/chunks/webpack-596ddb9e5090dbce.js",
+      "static/chunks/webpack-6c2d1170b2a43789.js",
       "static/chunks/framework-0249bf7bc1c3f377.js",
-      "static/chunks/main-439b59a3d598c416.js",
-      "static/chunks/pages/amp-79fb82e276fb82fc.js"
+      "static/chunks/main-dcba0176d4e7d6c0.js",
+      "static/chunks/pages/amp-dc9ee08f64b26a10.js"
     ],
     "/css": [
-      "static/chunks/webpack-596ddb9e5090dbce.js",
+      "static/chunks/webpack-6c2d1170b2a43789.js",
       "static/chunks/framework-0249bf7bc1c3f377.js",
-      "static/chunks/main-439b59a3d598c416.js",
+      "static/chunks/main-dcba0176d4e7d6c0.js",
       "static/css/94fdbc56eafa2039.css",
-      "static/chunks/pages/css-10d4fc9f36e1f8a8.js"
+      "static/chunks/pages/css-544d2f643bb52307.js"
     ],
     "/dynamic": [
-      "static/chunks/webpack-596ddb9e5090dbce.js",
+      "static/chunks/webpack-6c2d1170b2a43789.js",
       "static/chunks/framework-0249bf7bc1c3f377.js",
-      "static/chunks/main-439b59a3d598c416.js",
-      "static/chunks/pages/dynamic-993ec996657d66dc.js"
+      "static/chunks/main-dcba0176d4e7d6c0.js",
+      "static/chunks/pages/dynamic-836d4a61af921b9e.js"
     ],
     "/edge-ssr": [
-      "static/chunks/webpack-596ddb9e5090dbce.js",
+      "static/chunks/webpack-6c2d1170b2a43789.js",
       "static/chunks/framework-0249bf7bc1c3f377.js",
-      "static/chunks/main-439b59a3d598c416.js",
-      "static/chunks/pages/edge-ssr-e603e308b21f734e.js"
+      "static/chunks/main-dcba0176d4e7d6c0.js",
+      "static/chunks/pages/edge-ssr-6e58abff3028d188.js"
     ],
     "/head": [
-      "static/chunks/webpack-596ddb9e5090dbce.js",
+      "static/chunks/webpack-6c2d1170b2a43789.js",
       "static/chunks/framework-0249bf7bc1c3f377.js",
-      "static/chunks/main-439b59a3d598c416.js",
-      "static/chunks/pages/head-d124b5fb804544eb.js"
+      "static/chunks/main-dcba0176d4e7d6c0.js",
+      "static/chunks/pages/head-06e10ac8d6cd67db.js"
     ],
     "/hooks": [
-      "static/chunks/webpack-596ddb9e5090dbce.js",
+      "static/chunks/webpack-6c2d1170b2a43789.js",
       "static/chunks/framework-0249bf7bc1c3f377.js",
-      "static/chunks/main-439b59a3d598c416.js",
-      "static/chunks/pages/hooks-d1015f6695524a5b.js"
+      "static/chunks/main-dcba0176d4e7d6c0.js",
+      "static/chunks/pages/hooks-cd9108a135578e81.js"
     ],
     "/image": [
-      "static/chunks/webpack-596ddb9e5090dbce.js",
+      "static/chunks/webpack-6c2d1170b2a43789.js",
       "static/chunks/framework-0249bf7bc1c3f377.js",
-      "static/chunks/main-439b59a3d598c416.js",
-      "static/chunks/pages/image-8fb70f06f0efc330.js"
+      "static/chunks/main-dcba0176d4e7d6c0.js",
+      "static/chunks/pages/image-d7bf11ab673ecb3f.js"
     ],
     "/link": [
-      "static/chunks/webpack-596ddb9e5090dbce.js",
+      "static/chunks/webpack-6c2d1170b2a43789.js",
       "static/chunks/framework-0249bf7bc1c3f377.js",
-      "static/chunks/main-439b59a3d598c416.js",
-      "static/chunks/pages/link-41a3a61645b563dc.js"
+      "static/chunks/main-dcba0176d4e7d6c0.js",
+      "static/chunks/pages/link-aca8a8d5e4145de1.js"
     ],
     "/routerDirect": [
-      "static/chunks/webpack-596ddb9e5090dbce.js",
+      "static/chunks/webpack-6c2d1170b2a43789.js",
       "static/chunks/framework-0249bf7bc1c3f377.js",
-      "static/chunks/main-439b59a3d598c416.js",
-      "static/chunks/pages/routerDirect-6f8978da85fef5eb.js"
+      "static/chunks/main-dcba0176d4e7d6c0.js",
+      "static/chunks/pages/routerDirect-1ea8459dd75e3757.js"
     ],
     "/script": [
-      "static/chunks/webpack-596ddb9e5090dbce.js",
+      "static/chunks/webpack-6c2d1170b2a43789.js",
       "static/chunks/framework-0249bf7bc1c3f377.js",
-      "static/chunks/main-439b59a3d598c416.js",
-      "static/chunks/pages/script-56d3ff5faa49811d.js"
+      "static/chunks/main-dcba0176d4e7d6c0.js",
+      "static/chunks/pages/script-178c2ac994fe2199.js"
     ],
     "/withRouter": [
-      "static/chunks/webpack-596ddb9e5090dbce.js",
+      "static/chunks/webpack-6c2d1170b2a43789.js",
       "static/chunks/framework-0249bf7bc1c3f377.js",
-      "static/chunks/main-439b59a3d598c416.js",
-      "static/chunks/pages/withRouter-394e599a32dcd7a4.js"
+      "static/chunks/main-dcba0176d4e7d6c0.js",
+      "static/chunks/pages/withRouter-27de9f24be6003e9.js"
     ]
   },
   ampFirstPages: []
Diff for middleware-r..-manifest.js
@@ -1,6 +1,6 @@
 self.__REACT_LOADABLE_MANIFEST = {
   "dynamic.js -> ../components/hello": {
-    id: 3900,
-    files: ["static/chunks/900.f01fcc2109adde55.js"]
+    id: 5886,
+    files: ["static/chunks/886.b879335d00f271d1.js"]
   }
 };
Diff for middleware.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [826],
   {
-    /***/ 7811: /***/ (
+    /***/ 6404: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -14,13 +14,13 @@
         /* harmony export */
       });
       /* harmony import */ var next_dist_server_web_adapter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
-        674
+        9107
       );
 
       (0,
       next_dist_server_web_adapter__WEBPACK_IMPORTED_MODULE_0__ /* .enhanceGlobals */.gL)();
 
-      var mod = __webpack_require__(7352);
+      var mod = __webpack_require__(5250);
       var handler = mod.middleware || mod.default;
 
       if (typeof handler !== "function") {
@@ -46,7 +46,7 @@
       /***/
     },
 
-    /***/ 7352: /***/ (
+    /***/ 5250: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -58,7 +58,7 @@
         /* harmony export */
       });
       /* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
-        8352
+        9541
       );
       /* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(
         next_server__WEBPACK_IMPORTED_MODULE_0__
@@ -71,7 +71,7 @@
       /***/
     },
 
-    /***/ 5195: /***/ (__unused_webpack_module, exports) => {
+    /***/ 3239: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -91,7 +91,7 @@
       /***/
     },
 
-    /***/ 9923: /***/ (__unused_webpack_module, exports) => {
+    /***/ 7793: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -129,7 +129,7 @@
       /***/
     },
 
-    /***/ 5401: /***/ (__unused_webpack_module, exports) => {
+    /***/ 7432: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -161,7 +161,7 @@
       /***/
     },
 
-    /***/ 5316: /***/ (
+    /***/ 5154: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -172,8 +172,8 @@
         value: true
       });
       exports.addLocale = addLocale;
-      var _addPathPrefix = __webpack_require__(8976);
-      var _pathHasPrefix = __webpack_require__(9882);
+      var _addPathPrefix = __webpack_require__(4632);
+      var _pathHasPrefix = __webpack_require__(387);
       function addLocale(path, locale, defaultLocale, ignorePrefix) {
         if (
           locale &&
@@ -193,7 +193,7 @@
       /***/
     },
 
-    /***/ 8976: /***/ (
+    /***/ 4632: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -204,7 +204,7 @@
         value: true
       });
       exports.addPathPrefix = addPathPrefix;
-      var _parsePath = __webpack_require__(5606);
+      var _parsePath = __webpack_require__(386);
       function addPathPrefix(path, prefix) {
         if (!path.startsWith("/") || !prefix) {
           return path;
@@ -216,7 +216,7 @@
       /***/
     },
 
-    /***/ 3009: /***/ (
+    /***/ 5045: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -227,7 +227,7 @@
         value: true
       });
       exports.addPathSuffix = addPathSuffix;
-      var _parsePath = __webpack_require__(5606);
+      var _parsePath = __webpack_require__(386);
       function addPathSuffix(path, suffix) {
         if (!path.startsWith("/") || !suffix) {
           return path;
@@ -239,7 +239,7 @@
       /***/
     },
 
-    /***/ 4234: /***/ (
+    /***/ 7100: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -250,10 +250,10 @@
         value: true
       });
       exports.formatNextPathnameInfo = formatNextPathnameInfo;
-      var _removeTrailingSlash = __webpack_require__(8336);
-      var _addPathPrefix = __webpack_require__(8976);
-      var _addPathSuffix = __webpack_require__(3009);
-      var _addLocale = __webpack_require__(5316);
+      var _removeTrailingSlash = __webpack_require__(8833);
+      var _addPathPrefix = __webpack_require__(4632);
+      var _addPathSuffix = __webpack_require__(5045);
+      var _addLocale = __webpack_require__(5154);
       function formatNextPathnameInfo(info) {
         let pathname = (0, _addLocale).addLocale(
           info.pathname,
@@ -281,7 +281,7 @@
       /***/
     },
 
-    /***/ 3633: /***/ (
+    /***/ 7139: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -292,9 +292,9 @@
         value: true
       });
       exports.getNextPathnameInfo = getNextPathnameInfo;
-      var _normalizeLocalePath = __webpack_require__(5401);
-      var _removePathPrefix = __webpack_require__(2811);
-      var _pathHasPrefix = __webpack_require__(9882);
+      var _normalizeLocalePath = __webpack_require__(7432);
+      var _removePathPrefix = __webpack_require__(3776);
+      var _pathHasPrefix = __webpack_require__(387);
       function getNextPathnameInfo(pathname, options) {
         var _nextConfig;
         const { basePath, i18n, trailingSlash } =
@@ -344,7 +344,7 @@
       /***/
     },
 
-    /***/ 5606: /***/ (__unused_webpack_module, exports) => {
+    /***/ 386: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -378,7 +378,7 @@
       /***/
     },
 
-    /***/ 9882: /***/ (
+    /***/ 387: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -389,7 +389,7 @@
         value: true
       });
       exports.pathHasPrefix = pathHasPrefix;
-      var _parsePath = __webpack_require__(5606);
+      var _parsePath = __webpack_require__(386);
       function pathHasPrefix(path, prefix) {
         if (typeof path !== "string") {
           return false;
@@ -401,7 +401,7 @@
       /***/
     },
 
-    /***/ 4258: /***/ (__unused_webpack_module, exports) => {
+    /***/ 1142: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -420,7 +420,7 @@
       /***/
     },
 
-    /***/ 2811: /***/ (
+    /***/ 3776: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -431,7 +431,7 @@
         value: true
       });
       exports.removePathPrefix = removePathPrefix;
-      var _pathHasPrefix = __webpack_require__(9882);
+      var _pathHasPrefix = __webpack_require__(387);
       function removePathPrefix(path, prefix) {
         if ((0, _pathHasPrefix).pathHasPrefix(path, prefix)) {
           const withoutPrefix = path.slice(prefix.length);
@@ -445,7 +445,7 @@
       /***/
     },
 
-    /***/ 8336: /***/ (__unused_webpack_module, exports) => {
+    /***/ 8833: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -459,7 +459,7 @@
       /***/
     },
 
-    /***/ 5682: /***/ module => {
+    /***/ 4202: /***/ module => {
       var __dirname = "/";
       (() => {
         "use strict";
@@ -587,7 +587,7 @@
       /***/
     },
 
-    /***/ 6166: /***/ (module, exports, __webpack_require__) => {
+    /***/ 6204: /***/ (module, exports, __webpack_require__) => {
       var __dirname = "/";
       var __WEBPACK_AMD_DEFINE_RESULT__;
       (() => {
@@ -1429,7 +1429,7 @@
       /***/
     },
 
-    /***/ 6704: /***/ (__unused_webpack_module, exports) => {
+    /***/ 7864: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -1471,7 +1471,7 @@
       /***/
     },
 
-    /***/ 674: /***/ (
+    /***/ 9107: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -1485,14 +1485,14 @@
       exports.VL = adapter;
       exports.OT = blockUnallowedResponse;
       exports.gL = enhanceGlobals;
-      var _error = __webpack_require__(4524);
-      var _utils = __webpack_require__(88);
-      var _fetchEvent = __webpack_require__(8852);
-      var _request = __webpack_require__(5829);
-      var _response = __webpack_require__(5277);
-      var _relativizeUrl = __webpack_require__(4258);
-      var _nextUrl = __webpack_require__(3062);
-      var _internalUtils = __webpack_require__(6704);
+      var _error = __webpack_require__(8666);
+      var _utils = __webpack_require__(30);
+      var _fetchEvent = __webpack_require__(9833);
+      var _request = __webpack_require__(5985);
+      var _response = __webpack_require__(5165);
+      var _relativizeUrl = __webpack_require__(1142);
+      var _nextUrl = __webpack_require__(4901);
+      var _internalUtils = __webpack_require__(7864);
       class NextRequestHint extends _request.NextRequest {
         constructor(params) {
           super(params.input, params.init);
@@ -1714,7 +1714,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       /***/
     },
 
-    /***/ 4524: /***/ (__unused_webpack_module, exports) => {
+    /***/ 8666: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -1755,7 +1755,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       /***/
     },
 
-    /***/ 3062: /***/ (
+    /***/ 4901: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -1765,10 +1765,10 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       Object.defineProperty(exports, "__esModule", {
         value: true
       });
-      var _detectDomainLocale = __webpack_require__(9923);
-      var _formatNextPathnameInfo = __webpack_require__(4234);
-      var _getHostname = __webpack_require__(5195);
-      var _getNextPathnameInfo = __webpack_require__(3633);
+      var _detectDomainLocale = __webpack_require__(7793);
+      var _formatNextPathnameInfo = __webpack_require__(7100);
+      var _getHostname = __webpack_require__(3239);
+      var _getNextPathnameInfo = __webpack_require__(7139);
       const FLIGHT_PARAMETERS = [
         "__flight__",
         "__flight_router_state_tree__",
@@ -2056,7 +2056,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       /***/
     },
 
-    /***/ 3868: /***/ (
+    /***/ 4570: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -2066,7 +2066,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       Object.defineProperty(exports, "__esModule", {
         value: true
       });
-      var _cookie = _interopRequireDefault(__webpack_require__(5682));
+      var _cookie = _interopRequireDefault(__webpack_require__(4202));
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -2201,7 +2201,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       /***/
     },
 
-    /***/ 8852: /***/ (
+    /***/ 9833: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -2212,7 +2212,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         value: true
       });
       exports.waitUntilSymbol = void 0;
-      var _error = __webpack_require__(4524);
+      var _error = __webpack_require__(8666);
       const responseSymbol = Symbol("response");
       const passThroughSymbol = Symbol("passThrough");
       const waitUntilSymbol = Symbol("waitUntil");
@@ -2265,7 +2265,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       /***/
     },
 
-    /***/ 5829: /***/ (
+    /***/ 5985: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -2276,10 +2276,10 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         value: true
       });
       exports.INTERNALS = void 0;
-      var _nextUrl = __webpack_require__(3062);
-      var _utils = __webpack_require__(88);
-      var _error = __webpack_require__(4524);
-      var _cookies = __webpack_require__(3868);
+      var _nextUrl = __webpack_require__(4901);
+      var _utils = __webpack_require__(30);
+      var _error = __webpack_require__(8666);
+      var _cookies = __webpack_require__(4570);
       const INTERNALS = Symbol("internal request");
       exports.INTERNALS = INTERNALS;
       class NextRequest extends Request {
@@ -2360,7 +2360,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       /***/
     },
 
-    /***/ 5277: /***/ (
+    /***/ 5165: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -2370,9 +2370,9 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       Object.defineProperty(exports, "__esModule", {
         value: true
       });
-      var _nextUrl = __webpack_require__(3062);
-      var _utils = __webpack_require__(88);
-      var _cookies = __webpack_require__(3868);
+      var _nextUrl = __webpack_require__(4901);
+      var _utils = __webpack_require__(30);
+      var _cookies = __webpack_require__(4570);
       const INTERNALS = Symbol("internal response");
       const REDIRECTS = new Set([301, 302, 303, 307, 308]);
       class NextResponse extends Response {
@@ -2462,7 +2462,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       /***/
     },
 
-    /***/ 7873: /***/ (
+    /***/ 9132: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -2476,7 +2476,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       __webpack_unused_export__ = isBot;
       exports.Nf = userAgentFromString;
       exports.WE = userAgent;
-      var _uaParserJs = _interopRequireDefault(__webpack_require__(6166));
+      var _uaParserJs = _interopRequireDefault(__webpack_require__(6204));
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -2504,7 +2504,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       /***/
     },
 
-    /***/ 88: /***/ (__unused_webpack_module, exports) => {
+    /***/ 30: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -2619,14 +2619,14 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       /***/
     },
 
-    /***/ 8352: /***/ (module, exports, __webpack_require__) => {
+    /***/ 9541: /***/ (module, exports, __webpack_require__) => {
       const serverExports = {
-        NextRequest: __webpack_require__(5829).NextRequest,
-        NextResponse: __webpack_require__(5277).NextResponse,
+        NextRequest: __webpack_require__(5985).NextRequest,
+        NextResponse: __webpack_require__(5165).NextResponse,
         userAgentFromString: __webpack_require__(
-          7873
+          9132
         ) /* .userAgentFromString */.Nf,
-        userAgent: __webpack_require__(7873) /* .userAgent */.WE
+        userAgent: __webpack_require__(9132) /* .userAgent */.WE
       };
 
       if (typeof URLPattern !== "undefined") {
@@ -2652,7 +2652,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = moduleId =>
       __webpack_require__((__webpack_require__.s = moduleId));
-    /******/ var __webpack_exports__ = __webpack_exec__(7811);
+    /******/ var __webpack_exports__ = __webpack_exec__(6404);
     /******/ (_ENTRIES =
       typeof _ENTRIES === "undefined"
         ? {}
Diff for edge-ssr.js

Diff too large to display

Diff for _buildManifest.js
@@ -1,28 +1,28 @@
 self.__BUILD_MANIFEST = {
   __rewrites: { beforeFiles: [], afterFiles: [], fallback: [] },
-  "/": ["static\u002Fchunks\u002Fpages\u002Findex-eff379b6d5b9bb68.js"],
-  "/_error": ["static\u002Fchunks\u002Fpages\u002F_error-178a994c6aae5c09.js"],
-  "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-79fb82e276fb82fc.js"],
+  "/": ["static\u002Fchunks\u002Fpages\u002Findex-2d083d34263a3ab6.js"],
+  "/_error": ["static\u002Fchunks\u002Fpages\u002F_error-d3adcea7db63be0b.js"],
+  "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-dc9ee08f64b26a10.js"],
   "/css": [
     "static\u002Fcss\u002F94fdbc56eafa2039.css",
-    "static\u002Fchunks\u002Fpages\u002Fcss-10d4fc9f36e1f8a8.js"
+    "static\u002Fchunks\u002Fpages\u002Fcss-544d2f643bb52307.js"
   ],
   "/dynamic": [
-    "static\u002Fchunks\u002Fpages\u002Fdynamic-993ec996657d66dc.js"
+    "static\u002Fchunks\u002Fpages\u002Fdynamic-836d4a61af921b9e.js"
   ],
   "/edge-ssr": [
-    "static\u002Fchunks\u002Fpages\u002Fedge-ssr-e603e308b21f734e.js"
+    "static\u002Fchunks\u002Fpages\u002Fedge-ssr-6e58abff3028d188.js"
   ],
-  "/head": ["static\u002Fchunks\u002Fpages\u002Fhead-d124b5fb804544eb.js"],
-  "/hooks": ["static\u002Fchunks\u002Fpages\u002Fhooks-d1015f6695524a5b.js"],
-  "/image": ["static\u002Fchunks\u002Fpages\u002Fimage-8fb70f06f0efc330.js"],
-  "/link": ["static\u002Fchunks\u002Fpages\u002Flink-41a3a61645b563dc.js"],
+  "/head": ["static\u002Fchunks\u002Fpages\u002Fhead-06e10ac8d6cd67db.js"],
+  "/hooks": ["static\u002Fchunks\u002Fpages\u002Fhooks-cd9108a135578e81.js"],
+  "/image": ["static\u002Fchunks\u002Fpages\u002Fimage-d7bf11ab673ecb3f.js"],
+  "/link": ["static\u002Fchunks\u002Fpages\u002Flink-aca8a8d5e4145de1.js"],
   "/routerDirect": [
-    "static\u002Fchunks\u002Fpages\u002FrouterDirect-6f8978da85fef5eb.js"
+    "static\u002Fchunks\u002Fpages\u002FrouterDirect-1ea8459dd75e3757.js"
   ],
-  "/script": ["static\u002Fchunks\u002Fpages\u002Fscript-56d3ff5faa49811d.js"],
+  "/script": ["static\u002Fchunks\u002Fpages\u002Fscript-178c2ac994fe2199.js"],
   "/withRouter": [
-    "static\u002Fchunks\u002Fpages\u002FwithRouter-394e599a32dcd7a4.js"
+    "static\u002Fchunks\u002Fpages\u002FwithRouter-27de9f24be6003e9.js"
   ],
   sortedPages: [
     "\u002F",
Diff for _app-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [888],
   {
-    /***/ 3115: /***/ function(
+    /***/ 1113: /***/ function(
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/_app",
         function() {
-          return __webpack_require__(2501);
+          return __webpack_require__(4802);
         }
       ]);
       if (false) {
@@ -24,7 +24,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 179], function() {
-      return __webpack_exec__(3115), __webpack_exec__(6401);
+      return __webpack_exec__(1113), __webpack_exec__(2385);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for _error-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [820],
   {
-    /***/ 5374: /***/ function(
+    /***/ 3363: /***/ function(
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/_error",
         function() {
-          return __webpack_require__(7969);
+          return __webpack_require__(3273);
         }
       ]);
       if (false) {
@@ -24,7 +24,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [888, 774, 179], function() {
-      return __webpack_exec__(5374);
+      return __webpack_exec__(3363);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for amp-HASH.js
@@ -1,17 +1,17 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [216],
   {
-    /***/ 8510: /***/ function(
+    /***/ 8753: /***/ function(
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(6464);
+      module.exports = __webpack_require__(9709);
 
       /***/
     },
 
-    /***/ 7010: /***/ function(
+    /***/ 5348: /***/ function(
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -19,7 +19,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/amp",
         function() {
-          return __webpack_require__(2461);
+          return __webpack_require__(7503);
         }
       ]);
       if (false) {
@@ -28,7 +28,7 @@
       /***/
     },
 
-    /***/ 6464: /***/ function(module, exports, __webpack_require__) {
+    /***/ 9709: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -38,8 +38,8 @@
       var _interop_require_default = __webpack_require__(7022) /* ["default"] */
         .Z;
       var _react = _interop_require_default(__webpack_require__(959));
-      var _ampContext = __webpack_require__(1258);
-      var _ampMode = __webpack_require__(5976);
+      var _ampContext = __webpack_require__(8373);
+      var _ampMode = __webpack_require__(7380);
       function useAmp() {
         // Don't assign the context value to a variable to save bytes
         return (0, _ampMode).isInAmpMode(
@@ -61,7 +61,7 @@
       /***/
     },
 
-    /***/ 2461: /***/ function(
+    /***/ 7503: /***/ function(
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -78,7 +78,7 @@
         /* harmony export */
       });
       /* harmony import */ var next_amp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
-        8510
+        8753
       );
       /* harmony import */ var next_amp__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(
         next_amp__WEBPACK_IMPORTED_MODULE_0__
@@ -102,7 +102,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [888, 774, 179], function() {
-      return __webpack_exec__(7010);
+      return __webpack_exec__(5348);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for css-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [706],
   {
-    /***/ 860: /***/ function(
+    /***/ 6437: /***/ function(
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/css",
         function() {
-          return __webpack_require__(7832);
+          return __webpack_require__(7135);
         }
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 7832: /***/ function(
+    /***/ 7135: /***/ function(
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -29,7 +29,7 @@
         1527
       );
       /* harmony import */ var _css_module_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
-        2707
+        3934
       );
       /* harmony import */ var _css_module_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(
         _css_module_css__WEBPACK_IMPORTED_MODULE_1__
@@ -48,7 +48,7 @@
       /***/
     },
 
-    /***/ 2707: /***/ function(module) {
+    /***/ 3934: /***/ function(module) {
       // extracted by mini-css-extract-plugin
       module.exports = { helloWorld: "css_helloWorld__qqNwY" };
 
@@ -61,7 +61,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function() {
-      return __webpack_exec__(860);
+      return __webpack_exec__(6437);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for dynamic-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [739],
   {
-    /***/ 3995: /***/ function(
+    /***/ 7753: /***/ function(
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/dynamic",
         function() {
-          return __webpack_require__(2523);
+          return __webpack_require__(4683);
         }
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 2627: /***/ function(module, exports, __webpack_require__) {
+    /***/ 5434: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -35,7 +35,7 @@
       var _interop_require_default = __webpack_require__(7022) /* ["default"] */
         .Z;
       var _react = _interop_require_default(__webpack_require__(959));
-      var _loadable = _interop_require_default(__webpack_require__(2132));
+      var _loadable = _interop_require_default(__webpack_require__(5682));
       function dynamic(dynamicOptions, options) {
         var loadableFn = _loadable.default;
         var loadableOptions = (options == null
@@ -139,7 +139,7 @@
       /***/
     },
 
-    /***/ 1685: /***/ function(
+    /***/ 9106: /***/ function(
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -161,12 +161,13 @@
       /***/
     },
 
-    /***/ 2132: /***/ function(
+    /***/ 5682: /***/ function(
       __unused_webpack_module,
       exports,
       __webpack_require__
     ) {
       "use strict";
+      /* provided dependency */ var process = __webpack_require__(3263);
 
       Object.defineProperty(exports, "__esModule", {
         value: true
@@ -181,7 +182,7 @@
       var _interop_require_default = __webpack_require__(7022) /* ["default"] */
         .Z;
       var _react = _interop_require_default(__webpack_require__(959));
-      var _loadableContext = __webpack_require__(1685);
+      var _loadableContext = __webpack_require__(9106);
       var useSyncExternalStore = (true ? __webpack_require__(959) : 0)
         .useSyncExternalStore;
       var ALL_INITIALIZERS = [];
@@ -298,10 +299,11 @@
         }
         /** @type LoadableSubscription */ var subscription = null;
         // Server only
-        if (false) {
+        if (!!process.env.NEXT_RUNTIME) {
+          ALL_INITIALIZERS.push(init);
         }
         // Client only
-        if (!initialized && "object" !== "undefined") {
+        if (!initialized && !process.env.NEXT_RUNTIME) {
           // require.resolveWeak check is needed for environments that don't have it available like Jest
           var moduleIds =
             opts.webpack && "function" === "function"
@@ -486,7 +488,7 @@
           flushInitializers(READY_INITIALIZERS, ids).then(res, res);
         });
       };
-      if (true) {
+      if (!process.env.NEXT_RUNTIME) {
         window.__NEXT_PRELOADREADY = Loadable.preloadReady;
       }
       var _default = Loadable;
@@ -495,7 +497,7 @@
       /***/
     },
 
-    /***/ 2523: /***/ function(
+    /***/ 4683: /***/ function(
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -512,7 +514,7 @@
         1527
       );
       /* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
-        6113
+        2677
       );
       /* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(
         next_dynamic__WEBPACK_IMPORTED_MODULE_1__
@@ -521,13 +523,13 @@
       var DynamicHello = next_dynamic__WEBPACK_IMPORTED_MODULE_1___default()(
         function() {
           return __webpack_require__
-            .e(/* import() */ 900)
-            .then(__webpack_require__.bind(__webpack_require__, 3900));
+            .e(/* import() */ 886)
+            .then(__webpack_require__.bind(__webpack_require__, 5886));
         },
         {
           loadableGenerated: {
             webpack: function() {
-              return [/*require.resolve*/ 3900];
+              return [/*require.resolve*/ 5886];
             }
           }
         }
@@ -557,12 +559,12 @@
       /***/
     },
 
-    /***/ 6113: /***/ function(
+    /***/ 2677: /***/ function(
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(2627);
+      module.exports = __webpack_require__(5434);
 
       /***/
     }
@@ -573,7 +575,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function() {
-      return __webpack_exec__(3995);
+      return __webpack_exec__(7753);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for edge-ssr-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [800],
   {
-    /***/ 6219: /***/ function(
+    /***/ 6027: /***/ function(
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/edge-ssr",
         function() {
-          return __webpack_require__(7692);
+          return __webpack_require__(3789);
         }
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 7692: /***/ function(
+    /***/ 3789: /***/ function(
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -54,7 +54,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [888, 774, 179], function() {
-      return __webpack_exec__(6219);
+      return __webpack_exec__(6027);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for head-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [645],
   {
-    /***/ 2899: /***/ function(
+    /***/ 6955: /***/ function(
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/head",
         function() {
-          return __webpack_require__(6820);
+          return __webpack_require__(4489);
         }
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 6820: /***/ function(
+    /***/ 4489: /***/ function(
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -35,7 +35,7 @@
         1527
       );
       /* harmony import */ var next_head__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
-        8412
+        9046
       );
       /* harmony import */ var next_head__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(
         next_head__WEBPACK_IMPORTED_MODULE_1__
@@ -71,12 +71,12 @@
       /***/
     },
 
-    /***/ 8412: /***/ function(
+    /***/ 9046: /***/ function(
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(8684);
+      module.exports = __webpack_require__(1453);
 
       /***/
     }
@@ -87,7 +87,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function() {
-      return __webpack_exec__(2899);
+      return __webpack_exec__(6955);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for hooks-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [757],
   {
-    /***/ 2304: /***/ function(
+    /***/ 7819: /***/ function(
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/hooks",
         function() {
-          return __webpack_require__(7679);
+          return __webpack_require__(5372);
         }
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 7679: /***/ function(
+    /***/ 5372: /***/ function(
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -132,7 +132,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function() {
-      return __webpack_exec__(2304);
+      return __webpack_exec__(7819);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for image-HASH.js
@@ -26,7 +26,7 @@
       /***/
     },
 
-    /***/ 5885: /***/ function(
+    /***/ 801: /***/ function(
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -34,7 +34,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/image",
         function() {
-          return __webpack_require__(7547);
+          return __webpack_require__(6913);
         }
       ]);
       if (false) {
@@ -43,7 +43,7 @@
       /***/
     },
 
-    /***/ 3200: /***/ function(module, exports, __webpack_require__) {
+    /***/ 206: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -67,12 +67,12 @@
         5997
       ) /* ["default"] */.Z;
       var _react = _interop_require_wildcard(__webpack_require__(959));
-      var _head = _interop_require_default(__webpack_require__(8684));
-      var _imageConfig = __webpack_require__(5732);
-      var _useIntersection = __webpack_require__(157);
-      var _imageConfigContext = __webpack_require__(891);
-      var _utils = __webpack_require__(7944);
-      var _normalizeTrailingSlash = __webpack_require__(3912);
+      var _head = _interop_require_default(__webpack_require__(1453));
+      var _imageConfig = __webpack_require__(4188);
+      var _useIntersection = __webpack_require__(4422);
+      var _imageConfigContext = __webpack_require__(7971);
+      var _utils = __webpack_require__(8858);
+      var _normalizeTrailingSlash = __webpack_require__(5289);
       function Image(_param) {
         var src = _param.src,
           sizes = _param.sizes,
@@ -929,7 +929,7 @@
       /***/
     },
 
-    /***/ 157: /***/ function(module, exports, __webpack_require__) {
+    /***/ 4422: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -941,7 +941,7 @@
       });
       exports.useIntersection = useIntersection;
       var _react = __webpack_require__(959);
-      var _requestIdleCallback = __webpack_require__(9186);
+      var _requestIdleCallback = __webpack_require__(2398);
       var hasIntersectionObserver = typeof IntersectionObserver === "function";
       var observers = new Map();
       var idList = [];
@@ -1066,7 +1066,7 @@
       /***/
     },
 
-    /***/ 7547: /***/ function(
+    /***/ 6913: /***/ function(
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -1087,8 +1087,8 @@
 
       // EXTERNAL MODULE: ./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js
       var jsx_runtime = __webpack_require__(1527);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_biqbaboplfbrettd7655fr4n2y/node_modules/next/image.js
-      var next_image = __webpack_require__(3960);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_biqbaboplfbrettd7655fr4n2y/node_modules/next/image.js
+      var next_image = __webpack_require__(8249);
       var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // CONCATENATED MODULE: ./pages/nextjs.png
       /* harmony default export */ var nextjs = {
         src: "/_next/static/media/nextjs.cae0b805.png",
@@ -1118,12 +1118,12 @@
       /***/
     },
 
-    /***/ 3960: /***/ function(
+    /***/ 8249: /***/ function(
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(3200);
+      module.exports = __webpack_require__(206);
 
       /***/
     }
@@ -1134,7 +1134,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function() {
-      return __webpack_exec__(5885);
+      return __webpack_exec__(801);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for index-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [405],
   {
-    /***/ 3558: /***/ function(
+    /***/ 6481: /***/ function(
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/",
         function() {
-          return __webpack_require__(80);
+          return __webpack_require__(5376);
         }
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 80: /***/ function(
+    /***/ 5376: /***/ function(
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -46,7 +46,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [888, 774, 179], function() {
-      return __webpack_exec__(3558);
+      return __webpack_exec__(6481);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for link-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [644],
   {
-    /***/ 8662: /***/ function(
+    /***/ 7014: /***/ function(
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/link",
         function() {
-          return __webpack_require__(1269);
+          return __webpack_require__(1226);
         }
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 6999: /***/ function(module, exports) {
+    /***/ 7173: /***/ function(module, exports) {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -54,7 +54,7 @@
       /***/
     },
 
-    /***/ 8036: /***/ function(module, exports, __webpack_require__) {
+    /***/ 404: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -73,13 +73,13 @@
         5997
       ) /* ["default"] */.Z;
       var _react = _interop_require_default(__webpack_require__(959));
-      var _router = __webpack_require__(319);
-      var _addLocale = __webpack_require__(2421);
-      var _routerContext = __webpack_require__(3977);
-      var _appRouterContext = __webpack_require__(8766);
-      var _useIntersection = __webpack_require__(157);
-      var _getDomainLocale = __webpack_require__(6999);
-      var _addBasePath = __webpack_require__(6526);
+      var _router = __webpack_require__(8107);
+      var _addLocale = __webpack_require__(7543);
+      var _routerContext = __webpack_require__(9303);
+      var _appRouterContext = __webpack_require__(7500);
+      var _useIntersection = __webpack_require__(4422);
+      var _getDomainLocale = __webpack_require__(7173);
+      var _addBasePath = __webpack_require__(2851);
       ("client");
       var prefetched = {};
       function prefetch(router, href, as, options) {
@@ -425,7 +425,7 @@
       /***/
     },
 
-    /***/ 157: /***/ function(module, exports, __webpack_require__) {
+    /***/ 4422: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -437,7 +437,7 @@
       });
       exports.useIntersection = useIntersection;
       var _react = __webpack_require__(959);
-      var _requestIdleCallback = __webpack_require__(9186);
+      var _requestIdleCallback = __webpack_require__(2398);
       var hasIntersectionObserver = typeof IntersectionObserver === "function";
       var observers = new Map();
       var idList = [];
@@ -562,7 +562,7 @@
       /***/
     },
 
-    /***/ 8766: /***/ function(
+    /***/ 7500: /***/ function(
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -590,7 +590,7 @@
       /***/
     },
 
-    /***/ 1269: /***/ function(
+    /***/ 1226: /***/ function(
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -607,7 +607,7 @@
         1527
       );
       /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
-        4595
+        9495
       );
       /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(
         next_link__WEBPACK_IMPORTED_MODULE_1__
@@ -638,12 +638,12 @@
       /***/
     },
 
-    /***/ 4595: /***/ function(
+    /***/ 9495: /***/ function(
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(8036);
+      module.exports = __webpack_require__(404);
 
       /***/
     }
@@ -654,7 +654,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function() {
-      return __webpack_exec__(8662);
+      return __webpack_exec__(7014);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for routerDirect-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [58],
   {
-    /***/ 2188: /***/ function(
+    /***/ 7288: /***/ function(
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/routerDirect",
         function() {
-          return __webpack_require__(6938);
+          return __webpack_require__(6018);
         }
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 6938: /***/ function(
+    /***/ 6018: /***/ function(
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -35,7 +35,7 @@
         1527
       );
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
-        5866
+        5664
       );
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(
         next_router__WEBPACK_IMPORTED_MODULE_1__
@@ -56,12 +56,12 @@
       /***/
     },
 
-    /***/ 5866: /***/ function(
+    /***/ 5664: /***/ function(
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(6401);
+      module.exports = __webpack_require__(2385);
 
       /***/
     }
@@ -72,7 +72,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function() {
-      return __webpack_exec__(2188);
+      return __webpack_exec__(7288);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for script-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [797],
   {
-    /***/ 1136: /***/ function(
+    /***/ 6695: /***/ function(
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/script",
         function() {
-          return __webpack_require__(3560);
+          return __webpack_require__(4237);
         }
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 3560: /***/ function(
+    /***/ 4237: /***/ function(
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -35,7 +35,7 @@
         1527
       );
       /* harmony import */ var next_script__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
-        9096
+        6071
       );
       /* harmony import */ var next_script__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(
         next_script__WEBPACK_IMPORTED_MODULE_1__
@@ -70,12 +70,12 @@
       /***/
     },
 
-    /***/ 9096: /***/ function(
+    /***/ 6071: /***/ function(
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(9142);
+      module.exports = __webpack_require__(1149);
 
       /***/
     }
@@ -86,7 +86,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function() {
-      return __webpack_exec__(1136);
+      return __webpack_exec__(6695);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for withRouter-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [807],
   {
-    /***/ 3551: /***/ function(
+    /***/ 8118: /***/ function(
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/withRouter",
         function() {
-          return __webpack_require__(6216);
+          return __webpack_require__(3622);
         }
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 6216: /***/ function(
+    /***/ 3622: /***/ function(
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -35,7 +35,7 @@
         1527
       );
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
-        5866
+        5664
       );
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(
         next_router__WEBPACK_IMPORTED_MODULE_1__
@@ -54,12 +54,12 @@
       /***/
     },
 
-    /***/ 5866: /***/ function(
+    /***/ 5664: /***/ function(
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(6401);
+      module.exports = __webpack_require__(2385);
 
       /***/
     }
@@ -70,7 +70,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function() {
-      return __webpack_exec__(3551);
+      return __webpack_exec__(8118);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for 900.HASH.js
@@ -1,8 +1,8 @@
 "use strict";
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
-  [900],
+  [886],
   {
-    /***/ 3900: /***/ function(
+    /***/ 5886: /***/ function(
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
Diff for main-HASH.js

Diff too large to display

Diff for webpack-HASH.js
@@ -159,7 +159,7 @@
     /******/ __webpack_require__.u = function(chunkId) {
       /******/ // return url for filenames based on template
       /******/ return (
-        "static/chunks/" + chunkId + "." + "f01fcc2109adde55" + ".js"
+        "static/chunks/" + chunkId + "." + "b879335d00f271d1" + ".js"
       );
       /******/
     };
@@ -175,6 +175,22 @@
       /******/
     };
     /******/
+  })(); /* webpack/runtime/global */
+  /******/
+
+  /******/ /******/ !(function() {
+    /******/ __webpack_require__.g = (function() {
+      /******/ if (typeof globalThis === "object") return globalThis;
+      /******/ try {
+        /******/ return this || new Function("return this")();
+        /******/
+      } catch (e) {
+        /******/ if (typeof window === "object") return window;
+        /******/
+      }
+      /******/
+    })();
+    /******/
   })(); /* webpack/runtime/hasOwnProperty shorthand */
   /******/
Diff for index.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-596ddb9e5090dbce.js"
+      src="/_next/static/chunks/webpack-6c2d1170b2a43789.js"
       defer=""
     ></script>
     <script
@@ -19,15 +19,15 @@
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/main-439b59a3d598c416.js"
+      src="/_next/static/chunks/main-dcba0176d4e7d6c0.js"
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/_app-92c368fd6cf3735d.js"
+      src="/_next/static/chunks/pages/_app-dfaef6942d774f42.js"
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/index-eff379b6d5b9bb68.js"
+      src="/_next/static/chunks/pages/index-2d083d34263a3ab6.js"
       defer=""
     ></script>
     <script src="/_next/static/BUILD_ID/_buildManifest.js" defer=""></script>
Diff for link.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-596ddb9e5090dbce.js"
+      src="/_next/static/chunks/webpack-6c2d1170b2a43789.js"
       defer=""
     ></script>
     <script
@@ -19,15 +19,15 @@
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/main-439b59a3d598c416.js"
+      src="/_next/static/chunks/main-dcba0176d4e7d6c0.js"
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/_app-92c368fd6cf3735d.js"
+      src="/_next/static/chunks/pages/_app-dfaef6942d774f42.js"
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/link-41a3a61645b563dc.js"
+      src="/_next/static/chunks/pages/link-aca8a8d5e4145de1.js"
       defer=""
     ></script>
     <script src="/_next/static/BUILD_ID/_buildManifest.js" defer=""></script>
Diff for withRouter.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-596ddb9e5090dbce.js"
+      src="/_next/static/chunks/webpack-6c2d1170b2a43789.js"
       defer=""
     ></script>
     <script
@@ -19,15 +19,15 @@
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/main-439b59a3d598c416.js"
+      src="/_next/static/chunks/main-dcba0176d4e7d6c0.js"
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/_app-92c368fd6cf3735d.js"
+      src="/_next/static/chunks/pages/_app-dfaef6942d774f42.js"
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/withRouter-394e599a32dcd7a4.js"
+      src="/_next/static/chunks/pages/withRouter-27de9f24be6003e9.js"
       defer=""
     ></script>
     <script src="/_next/static/BUILD_ID/_buildManifest.js" defer=""></script>

Default Build with SWC (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary feedthejim/next.js replace-typeof-window Change
buildDuration 25.1s 25.1s ⚠️ +34ms
buildDurationCached 7.7s 7.7s ⚠️ +18ms
nodeModulesSize 74.8 MB 74.8 MB ⚠️ +628 B
nextStartRea..uration (ms) 294ms 289ms -5ms
nextDevReadyDuration 316ms 318ms ⚠️ +2ms
Page Load Tests Overall increase ✓
vercel/next.js canary feedthejim/next.js replace-typeof-window Change
/ failed reqs 0 0
/ total time (seconds) 9.356 9.239 -0.12
/ avg req/sec 267.2 270.6 +3.4
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 6.3 6.156 -0.14
/error-in-render avg req/sec 396.84 406.1 +9.26
Client Bundles (main, webpack) Overall increase ⚠️
vercel/next.js canary feedthejim/next.js replace-typeof-window Change
900.HASH.js gzip 179 B 179 B
framework-HASH.js gzip 45.5 kB 45.5 kB
main-HASH.js gzip 30.9 kB 31.7 kB ⚠️ +759 B
webpack-HASH.js gzip 1.52 kB 1.59 kB ⚠️ +67 B
Overall change 78.1 kB 78.9 kB ⚠️ +826 B
Legacy Client Bundles (polyfills)
vercel/next.js canary feedthejim/next.js replace-typeof-window Change
polyfills-HASH.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages Overall increase ⚠️
vercel/next.js canary feedthejim/next.js replace-typeof-window Change
_app-HASH.js gzip 194 B 195 B ⚠️ +1 B
_error-HASH.js gzip 182 B 182 B
amp-HASH.js
Post job cleanup.
[command]/usr/bin/git version
git version 2.37.3
Temporarily overriding HOME='/home/runner/work/_temp/e7a9a826-5072-45a2-8795-a94b7422e613' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/next.js/next.js
[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: 6341a66

@@ -235,6 +235,8 @@ export default class NextNodeServer extends BaseServer {
process.env.__NEXT_SCRIPT_WORKERS = JSON.stringify(true)
}

process.env.NEXT_RUNTIME = 'nodejs'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@huozhi I did this like you did in

;(process.env as any).NEXT_RUNTIME = 'nodejs'
that should be fine right?

we need to do this because when the server is instanciated through here, process.env.NEXT_RUNTIME doesn't get inlined by webpack so we need to define it manually

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typeof window condition should work already, we don't need to change all the condition since swc is already doing that work. will check the process.env.NEXT_RUNTIME coverage then, kinda wired it doesn't work with test

@feedthejim feedthejim marked this pull request as ready for review September 19, 2022 09:23
@feedthejim
Copy link
Contributor Author

actually dropping in favor of keeping typeof window

@feedthejim feedthejim closed this Sep 19, 2022
@feedthejim feedthejim deleted the replace-typeof-window branch September 19, 2022 18:05
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants