1. 28 Sep, 2022 20 commits
    • Tim Neutkens's avatar
      v12.3.2-canary.12 · ebf2b298
      Tim Neutkens authored
      ebf2b298
    • Shu Ding's avatar
      Add test case for `react-server` import condition (#40997) · f0079a9c
      Shu Ding authored
      The `react-server` condition for `exports` is already covered. This PR adds a new test case to cover the `imports` condition for internal dependencies.
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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`
      - [x] Integration tests added
      - [ ] Documentation added
      - [ ] Telemetry added. In case of a feature if it's used or not.
      - [ ] Errors have a 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](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      f0079a9c
    • Shu Ding's avatar
      Fix unused CSS module imports are tracked on the server (#40996) · f7069c02
      Shu Ding authored
      Reported by @hanneslund, when a CSS modules file gets imported in server
      components, during `collectClientComponentsAndCSSForDependency` in our
      client entry plugin it will always be collected no matter it is used or
      not. Due to the restriction that we have to collect these imports to
      create the client entry, it has to run in the `finishMake` compiler
      phase and at that time, module optimization hasn't started yet.
      
      To fix that issue, we run another pass in `afterOptimizeModules` just to
      collect CSS imports for the server style manifest and we can filter out
      unused modules there.
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [x] Integration tests added
      - [ ] Errors have a 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 a 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](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
      f7069c02
    • Tim Neutkens's avatar
    • Shu Ding's avatar
      Fix wrong code condition used when bundling the server (#40987) · daad1171
      Shu Ding authored
      We observed this bug when using `.tsx` as the extension (currently the
      condition only matches `.m?js`). Besides that, `react/jsx-runtime`
      shouldn't be external too because it has React imported.
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [x] Integration tests added
      - [ ] Errors have a 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 a 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](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
      daad1171
    • Jimmy Lai's avatar
      misc: add MANGLING_DEBUG option (#40958) · e8f85e3d
      Jimmy Lai authored
      
      Context:
      
      I am doing some work re: bundle size so I'm spending a lot of time looking at the bundles we generate. This debug options basically deactives mangling and beautifies the output whilst keeping the dead code elimination from Terser which is helpful for me to check what I'm removing.
      
      this is what the output is like with it.
      
      <img width="566" alt="image" src="https://user-images.githubusercontent.com/11064311/192574974-4ff50fb8-43b2-44fe-9df3-c9e3a1b593f8.png">
      
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      e8f85e3d
    • Tim Neutkens's avatar
      Remove outdated warning (#40988) · 43dfc501
      Tim Neutkens authored
      Cleans up a leftover warning as it's no longer relevant to be shown at this particular spot.
      
      
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      43dfc501
    • Tim Neutkens's avatar
    • Tim Neutkens's avatar
      Revert "Fix" · 58d47361
      Tim Neutkens authored
      This reverts commit 112589e2.
      58d47361
    • Tim Neutkens's avatar
      Revert "Fix wasm" · cafb5ff8
      Tim Neutkens authored
      This reverts commit fbf1bd11.
      cafb5ff8
    • Tim Neutkens's avatar
      Revert "Fix" · 62f996e5
      Tim Neutkens authored
      This reverts commit 082e766e.
      62f996e5
    • Tim Neutkens's avatar
      Revert "Update swc" · 08066f67
      Tim Neutkens authored
      This reverts commit c3db1023.
      08066f67
    • Donny/강동윤's avatar
      Fix · 112589e2
      Donny/강동윤 authored
      112589e2
    • Donny/강동윤's avatar
      Fix wasm · fbf1bd11
      Donny/강동윤 authored
      fbf1bd11
    • Donny/강동윤's avatar
      Fix · 082e766e
      Donny/강동윤 authored
      082e766e
    • Donny/강동윤's avatar
      Update swc · c3db1023
      Donny/강동윤 authored
      c3db1023
    • Jimmy Lai's avatar
      edge-ssr: bundle next/dist as ESM for better tree-shaking (#40251) (#40980) · 8ff22ca3
      Jimmy Lai authored
      Re-do of https://github.com/vercel/next.js/pull/40251
      
      Edge SSR'd routes cold boot performances are proportional to the
      executed code size.
      
      In order to improve it, we are trying to optimize for the bundle size of
      a packed Edge SSR route.
      
      This PR adds ESM compilation targets for all Next.js dist packages and
      use them to bundle Edge SSR'd route.
      
      This allows us to leverage the better tree shaking/DCE for ESM modules
      in webpack in order to decrease the overall bundle size.
      
      This PR also enables minifying Edge SSR routes. Since we don't control
      which minifier might be used later (if any), it's best if we provide an
      already optimised bundle.
      
      <img width="903" alt="image"
      
      src="https://user-images.githubusercontent.com/11064311/190005211-b7cb2c58-a56a-44b0-8ee4-fd3f603e41bd.png">
      
      This is a 10ms cold boot win per my benchmarking script, which I'll put
      in a subsequent PR.
      
      Not done yet:
      - ~~swap exported requires in `next/link` (and others) etc to point them
      to the esm modules version~~
      
      <!--
      Thanks for opening a PR! Your contribution is much appreciated. In order
      to make sure your PR is handled as smoothly as possible we request that
      you follow the checklist sections below. Choose the right checklist for
      the change that you're making: -->
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have helpful link attached, see `contributing.md`
      
      - [x] 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`
      
      - [ ] Make sure the linting passes by running `pnpm lint`
      - [ ] The examples guidelines are followed from [our contributing
      doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      Co-authored-by: 's avatarShu Ding <g@shud.in>
      
      <!--
      Thanks for opening a PR! Your contribution is much appreciated.
      To make sure your PR is handled as smoothly as possible we request that
      you follow the checklist sections below.
      Choose the right checklist for the change that you're making:
      -->
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      Co-authored-by: 's avatarShu Ding <g@shud.in>
      8ff22ca3
    • Jimmy Lai's avatar
      misc: remove NEXT_RUNTIME=edge from middleware tests (#40977) · f7ce8ece
      Jimmy Lai authored
      This seems to be the cause for the failure of  https://github.com/vercel/next.js/actions/runs/3133433920/jobs/5087331787 that caused[ the revert](https://github.com/vercel/next.js/pull/40967) of my [commit ](https://github.com/vercel/next.js/commit/11deaaa82bda301254167967903a384ef6c4c51f) that changed the edge bundle to SSR.
      
      After investigating, I realised this was the culprit: this forces the test app code to run with this on, somehow, when built on Vercel.
      
      Removing it should fix it. Let's merge if all tests still pass?
      
      Open questions:
      - I'm not sure why this is/was needed, since this variable should always be inlined by webpack
      - furthermore, this was causing client code to run as-if on the edge?
      - but also, this still shouldn't happen because webpack should get rid of it
      
      
      
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      f7ce8ece
    • JJ Kasper's avatar
      Revert "Merge e2e test node_modules (#40926)" (#40974) · 070239e6
      JJ Kasper authored
      This reverts commit b508fef2.
      
      Fixes: https://github.com/vercel/next.js/actions/runs/3139454323/jobs/5100342131
      
      We aren't able to modify the filesystem for E2E deployments so this reverts the change introduced in the above PR to ensure deployment tests are able to run correctly with custom `node_modules`. 
      070239e6
    • JJ Kasper's avatar
      Update to use HEAD request for middleware query hydration (#40973) · 91f0a7c6
      JJ Kasper authored
      When fetching the middleware rewrite information via `_next/data` for a static page that is not a `fallback` we can use a `HEAD` request instead of a `GET` request which provides the necessary header information and saves some bandwidth by avoiding sending back the data that is already present in the page. 
      
      x-ref: [slack thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1664229966495469)
      
      ## Bug
      
      - [x] Related issues linked using `fixes #number`
      - [x] Integration tests added
      - [ ] Errors have a helpful link attached, see `contributing.md`
      91f0a7c6
  2. 27 Sep, 2022 20 commits
    • Jiachi Liu's avatar
      v12.3.2-canary.11 · 918b109d
      Jiachi Liu authored
      918b109d
    • JJ Kasper's avatar
      Revert "edge-ssr: bundle next/dist as ESM for better tree-shaking (#40251) (#40967) · ccc8d271
      JJ Kasper authored
      This reverts commit 11deaaa8.
      
      Temporarily reverts the above commit due to breaking middleware/edge
      functions once deployed.
      
      Fixes:
      https://github.com/vercel/next.js/actions/runs/3133433920/jobs/5087331787
      
      cc @shuding @feedthejim 
      
      ```sh
      [GET] /blog/first
      13:56:56:61
      2022-09-27T20:56:56.671Z	61d43a6a-34a1-40c0-b71f-4ae5d1918431	ERROR	/var/task/node_modules/next/dist/esm/client/router.js:1
      /* global window */ import React from 'react';
                          ^^^^^^
      SyntaxError: Cannot use import statement outside a module
          at Object.compileFunction (node:vm:352:18)
          at wrapSafe (node:internal/modules/cjs/loader:1033:15)
          at Module._compile (node:internal/modules/cjs/loader:1069:27)
          at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
          at Module.load (node:internal/modules/cjs/loader:981:32)
          at Function.Module._load (node:internal/modules/cjs/loader:822:12)
          at Module.require (node:internal/modules/cjs/loader:1005:19)
          at require (node:internal/modules/cjs/helpers:102:18)
          at Object.<anonymous> (/var/task/node_modules/next/router.js:3:7)
          at Module._compile (node:internal/modules/cjs/loader:1105:14)
      ```
      ccc8d271
    • Jiachi Liu's avatar
      remove legacy transform code (#40966) · b16fcccf
      Jiachi Liu authored
      * Remove legacy `__next_rsc__` transform
      * Fix `staticGenerationAsyncStorage` is null during rendering
      b16fcccf
    • JJ Kasper's avatar
    • Ethan Arrowood's avatar
      feat(experimental): option to polyfill `fetch` using `undici` in Node.js <18 (#40318) · e0cc9cd4
      Ethan Arrowood authored
      This PR adds a new `experimental.enableUndici` option to let the
      developer switch from `next-fetch` to `undici` as the underlying
      polyfill for `fetch` in Node.js.
      
      In the current implementation, Next.js makes sure that `fetch` is always
      available by using `node-fetch`. However, we do not polyfill in Node.js
      18+, since those versions come with their own `fetch` implementation
      already, built-in.
      
      Node.js 18+ uses `undici` under the hood, so letting the developer use
      `undici` earlier could make the migration easier later on.
      
      Eventually, we hope to be able to stop polyfilling `fetch` in an
      upcoming major version of Next.js, shipping less code.
      
      
      ## 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](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
      Co-authored-by: 's avatarBalázs Orbán <info@balazsorban.com>
      Co-authored-by: 's avatarSukka <isukkaw@gmail.com>
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      Co-authored-by: 's avatarSteven <steven@ceriously.com>
      e0cc9cd4
    • JJ Kasper's avatar
      Increase other timeouts · bc685142
      JJ Kasper authored
      bc685142
    • JJ Kasper's avatar
      Increase playwright install timeout to 5 min · 3a6d91b2
      JJ Kasper authored
      3a6d91b2
    • hashlash's avatar
      [Docs] Add useState and useEffect import (#40944) · ad613e4d
      hashlash authored
      It makes copy-pasting the code easier since the person will be aware of
      the import
      
      <!--
      Thanks for opening a PR! Your contribution is much appreciated.
      To make sure your PR is handled as smoothly as possible we request that
      you follow the checklist sections below.
      Choose the right checklist for the change that you're making:
      -->
      
      ## Documentation / Examples
      
      - [ ] Make sure the linting passes by running `pnpm lint`
      - [ ] The "examples guidelines" are followed from [our contributing
      doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      ad613e4d
    • Artur Sedlukha's avatar
      Typo in middleware upgrade guide (#40963) · 377a39a8
      Artur Sedlukha authored
      <!--
      Thanks for opening a PR! Your contribution is much appreciated.
      To make sure your PR is handled as smoothly as possible we request that
      you follow the checklist sections below.
      Choose the right checklist for the change that you're making:
      -->
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      377a39a8
    • Henrik Wenz's avatar
      docs: add inline documentation for Link props (#40855) · a283b7b1
      Henrik Wenz authored
      ## Example
      
      **Instead of:**
      
      <img width="674" alt="Screenshot 2022-09-23 at 21 25 58"
      src="https://user-images.githubusercontent.com/1265681/192042744-6f1163e2-32af-49a0-bfba-385e5a7bad71.png">
      
      
      **we should show:**
      
      <img width="890" alt="Screenshot 2022-09-23 at 19 37 21"
      src="https://user-images.githubusercontent.com/1265681/192042552-29e6a35a-49fc-4be1-89bf-edaa7b2f6dd9.png">
      
      ## Documentation / Examples
      
      - [x] Make sure the linting passes by running `pnpm lint`
      - [x] The "examples guidelines" are followed from [our contributing
      doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      
      ## Further Links
      
      - https://tsdoc.org/Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      a283b7b1
    • Hannes Bornö's avatar
      Font loader support in app (#40898) · f53f5815
      Hannes Bornö authored
      Makes sure font loader CSS ends up correctly in the Flight Manifest and Flight Client Entries.
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      f53f5815
    • Gal Schlezinger's avatar
      [edge] serialize custom config to middleware-manifest (#40881) · b24800be
      Gal Schlezinger authored
      This PR serializes `regions` into `middleware-manifest.json`,
      allowing to extend Edge Functions and Middleware for deployment
      providers.
      
      ## 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 a 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](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      Co-authored-by: 's avatarSeiya Nuta <nuta@seiya.me>
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      b24800be
    • JJ Kasper's avatar
      Add timeout to playwright setup job (#40960) · 9657f99e
      JJ Kasper authored
      The `npm i` step sometimes stall due to the network in GitHub actions so
      this adds a timeout so we aren't wasting CI time on this.
      
      x-ref:
      https://github.com/vercel/next.js/actions/runs/3136162957/jobs/5092826951
      9657f99e
    • Jimmy Lai's avatar
      remove reducer from server bundle (#40959) · c69677a5
      Jimmy Lai authored
      
      
      This reducer takes a good chunk of the bundle but is never run on the server so we can eliminate it. 5-10ms wins from my manual benchmark runs.
      
      ![image](https://user-images.githubusercontent.com/11064311/192577550-4b2c3fa1-1ce9-456a-a635-d708e8200f2d.png)
      
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      c69677a5
    • Jimmy Lai's avatar
      misc: add benchmarking script for edge rendering (#40716) · 6be28687
      Jimmy Lai authored
      This PR adds the benchmarking script I've been using for #40251 to
      measure the performance improvements that we make to the Edge SSR
      runtime.
      
      This tool:
      - uploads two version of the benchmarking project to Vercel, one with
      the latest canary and the one with your current local changes in dist
      (don't forget to build!)
      - runs some tests against the published url to measure TTFB
      - displays a nice chart and table
      
      What this doesn't do (yet):
      
      - allow you to choose which URL to compare
      - allow you to change the measured metric
      - run a battery of differnet test
      
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a helpful link attached, see `contributing.md`
      
      
      https://user-images.githubusercontent.com/11064311/191270204-04447e20-5a40-43a9-bcda-b7eaeb3d270a.mov
      
      
      ## Documentation / Examples
      
      - [ ] Make sure the linting passes by running `pnpm lint`
      - [ ] The "examples guidelines" are followed from [our contributing
      doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
      6be28687
    • Shu Ding's avatar
      Always show node_modules inside test in VS Code (#40956) · bb42d40f
      Shu Ding authored
      As per #40926 we commit all node_modules inside test so we can test external packages. It will be much more convenient to not hide them in VS Code. With this configuration, all node_modules folders will be excluded except for these under the test directory.
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      bb42d40f
    • Tim Neutkens's avatar
      Rename 404 -> not-found for new router (#40941) · 833a67ff
      Tim Neutkens authored
      As discussed with @sebmarkbage, the handling is more about showing a not found component than it is about a specific status code as these can come in late with streaming.
      
      
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      833a67ff
    • Jiachi Liu's avatar
      Merge e2e test node_modules (#40926) · b508fef2
      Jiachi Liu authored
      Merge e2e tests customized `node_modules` with installed `node_modules`,
      to let you debug easily locally without moving folder between
      `node_modules` and `node_modules_bak`
      
      Also add `optoutServerComponentsBundle` to config schema.
      b508fef2
    • Shu Ding's avatar
      Code refactoring for webpack-config (#40942) · c86a9b99
      Shu Ding authored
      Clean up some utils, global variables and RegExp usages from the places
      I touched recently.
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      c86a9b99
    • Shu Ding's avatar
      Fix SWC loader ignore for the server layer when Babel is used (#40939) · da8d2991
      Shu Ding authored
      Specific logic to handle the file transpilation on the server layer is
      implemented in SWC (#40603). When Babel is enabled, that SWC transform
      is ignored at the moment. In this PR we add an additional SWC pass after
      Babel to handle that.
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [x] Integration tests added
      - [ ] Errors have a 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 a 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](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
      da8d2991