- 24 Jun, 2023 4 commits
-
-
vercel-release-bot authored
-
realazy authored
-
JJ Kasper authored
These don't need to wait for the build step so we can remove the "needs" step from them to allow them to start earlier.
-
Jiachi Liu authored
Adding `nextConfig.output` to next-info output so that we could determine if users're using standalone mode if the reproduction is not clear or missing sometimes Example output ``` Relevant Packages: next: 13.4.8-canary.1 eslint-config-next: 13.4.8-canary.1 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3 Next.js Config: output: standalone ```
-
- 23 Jun, 2023 23 commits
-
-
Angel Lopez Pol authored
### What this PR does This PR fixes a minor typo on the Vercel Open Telemetry Docs. `It's not extensible and you should configure OpenTelemetry manually (if) you need to customize your setup.` That is all :) Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Zack Tanner authored
### What? In dev mode, routing to a 404 page will result in an infinite redirect cycle. This PR is an attempt to bring back similar functionality currently implemented in the [pages router.](https://github.com/vercel/next.js/blob/canary/packages/next/src/client/dev/on-demand-entries-client.ts#L41-L59) ### Why? When the `pong` event (emitted from `onHMR`) occurs on a page that doesn't exist, it will result in frequent calls to `router.fastRefresh()`. Because the server response is an error, it'll trigger a mpa navigation [here](https://github.com/vercel/next.js/blob/61ab4aadecb1f553fcb42ff9055d5b7af63c3f02/packages/next/src/client/components/router-reducer/fetch-server-response.ts#L115-L117), which is treated as an external route [here](https://github.com/vercel/next.js/blob/61ab4aadecb1f553fcb42ff9055d5b7af63c3f02/packages/next/src/client/components/router-reducer/reducers/fast-refresh-reducer.ts#L45-L53) (and thus the window is reloaded) In the case where you're on the page and it goes away, since we don't have access to `__NEXT_DATA__`, I opted to use the dispatcher which will trigger the parent `NotFoundBoundary`. This part felt a little awkward -- I'm open to suggestions on a better way to handle this. Closes NEXT-1299 Fixes #50585 --------- Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
최지원 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(s) that you're making: ## For Contributors ### Improving Documentation - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? Add configuration options to modify the `bodyParser` size as it used to be available in Page Router. ### Why? Server Actions "Error: Body exceeded 1mb limit" cannot be resolved since the body-parser limit size is hardcoded to `1mb`. ### How? Closes NEXT- Fixes # --> ### What? Add configuration options to modify the `bodyParser` size as it used to be available in Page Router for APIs. ```js export const config = { api: { responseLimit: false | '8mb' }, } ``` Reference: [API Routes Response Size Limit](https://nextjs.org/docs/messages/api-routes-response-size-limit) ### Why? Server Actions "Error: Body exceeded 1mb limit" cannot be resolved since the body-parser limit size is hardcoded to `1mb`. ```js // /packages/next/src/server/app-render/action-handler.ts // ... const actionData = (await parseBody(req, '1mb')) || '' // ... ``` Reference: https://github.com/vercel/next.js/blob/canary/packages/next/src/server/app-render/action-handler.ts#L355 ### How? - Added option "serverActionsLimit" as `SizeLimit` type to `config-shared.ts` - Modified `action-handler.ts` to validate `serverActions` & `serverActionsLimit` options in nextConfig - Added conditional `serverActionsLimit` value and `1mb` if falsy **Working on testing** Fixes #49891 | #51097 | #51099 --------- Co-authored-by:
JJ Kasper <jj@jjsweb.site> Co-authored-by:
Shu Ding <g@shud.in>
-
JJ Kasper authored
With the manualBasePath config we still need to normalize the trailing slash per that config. x-ref: [slack thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1687543336964799?thread_ts=1687487533.019499&cid=C03S8ED1DKM)
-
Shu Ding authored
This PR addresses a problem where the `createServerReference` is using the default condition of flight client (gets resolved to the Node build), but we use the Edge build of flight client for SSR. This causes 2 flight clients to exist during SSR.
-
Adam Mcgrath authored
### What? Add `url` property to response returned from patched fetch ### Why? So that libraries that rely on `response.url` work with the app directory and fetch cacheing ### How? Using the same code as https://github.com/vercel/edge-runtime/blob/edge-runtime%402.4.3/packages/primitives/src/primitives/fetch.js#L164 fixes #51642 Co-authored-by:
JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
Nick McCurdy authored
### What? Update docs for Google Analytics 4 ### Why? This page doesn't make it clear which script is recommended, and has code that's outdated and erroring. ### How? Update headings and clean up bad code.
-
Tyler Lutz authored
The tailwind.config.js in the fonts documentation was missing the app directory.
-
Aral Roca Gomez authored
I updated the with-next-translate example using the app directory and updated to current versions --------- Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Wyatt Johnson authored
This removes calls for rendering files in `pages/` via the server code and relies instead relies on the bundled `routeModule` to perform the rendering. Future cases that try to call the legacy render will hit a new: ``` Invariant: render should have used routeModule ``` Error. These cases should be reported.
-
Tim Neutkens authored
Add default modularizeImports that breaks up lucide-react, mui/icons-material, lodash, react-bootstrap (#50900) ## What? Adds a default modularizeImports that ensures `lucide-react`, `@mui/icons-material`, `lodash`, and `react-bootstrap` do not cause a massive amount of modules to be compiled in development. For example `@mui/icons-material` re-exports 10600 (10K+) modules from a single file. Even though it does not affect production bundle size it does affect build time, especially in development, and even more so when your filesystem is slow (e.g. what we're seeing on Windows). Related issue: #48748 (not closing) Co-authored-by:Shu Ding <3676859+shuding@users.noreply.github.com>
-
Morgan Feeney authored
Due to the size of grid tracks specified in the CSS I amended the usage of the HTML `sizes` attribute. The media can be ascertained from `gridTemplateColumns` and `gridGap` values, this change results in smaller images also being available in the srcset for use with sizes, which should be more performant.
-
SMG authored
Added missing dot in ```docs/02-app/01-building-your-application/06-configuring/03-environment-variables.mdx```
-
Jon Meyers authored
### What? Adds `supabase-js` as dependency for `with-supabase` example ### Why? `with-supabase` example is missing `supabase-js` dependency, which is a peer dependency of `@supabase/auth-helpers-nextjs` ### How? Adds `supabase-js` to `examples/with-supabase/package.json` Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Leah authored
Enables type checking for tests in CI and fixes a bunch of things related to that
-
JJ Kasper authored
Reverts vercel/next.js#51269 This is breaking some builds it looks like x-ref: https://github.com/vercel/next.js/actions/runs/5357843108/jobs/9719367732 x-ref: https://github.com/vercel/next.js/actions/runs/5357843108/jobs/9719368519
-
이현재 authored
I changed the tailwindcss code, which is written differently than the other elements in `app/page.tsx` <!-- 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(s) that you're making: ## For Contributors ### Improving Documentation or adding/fixing Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Co-authored-by:
Shu Ding <g@shud.in>
-
Delba de Oliveira authored
-
Tyler Lutz authored
Change 'Previous' to 'Previously'
-
Donny/강동윤 authored
### What? Update SWC crates to https://github.com/swc-project/swc/commit/8b765e6763d822cb464ed3708aee1622536601d7 ### Why? There were many patches. ### How? Closes WEB-1174 Turbopack counterpart: https://github.com/vercel/turbo/pull/5288
-
Bigyan authored
The file extensions of the generated file extensions section are not what it's supposed to be or not what documentation has specified. Co-authored-by:
Lee Robinson <9113740+leerob@users.noreply.github.com> Co-authored-by:
Jiachi Liu <4800338+huozhi@users.noreply.github.com>
-
Tobias Koppers authored
relanding #50830 and #51631 ### Turbopack Changes * https://github.com/vercel/turbo/pull/5254 <!-- OJ Kwon - ci(workflow): upload daily next.js test trace --> * https://github.com/vercel/turbo/pull/5363 <!-- Tobias Koppers - disable default features for turbopack-ecmascript-plugins -->
-
-
- 22 Jun, 2023 13 commits
-
-
vercel-release-bot authored
-
Jiachi Liu authored
Request data flow in the server ``` request ---> router worker (1) ---> ipc ---> render worker app (2) |-----> render worker pages (3) ``` When it's hitting `_next/*` unmatched routes in standalone server, it will render 404, but when you hit `_next/*` it will render app not-found as the app router is always enabled, but router worker isn't set up with require-hook for proper built-in react version, then the app-render will fail with `./server.edge` exports not found error. We detect if it's in the render worker, then do the app paths rendering instead of directly looking up for app paths in route worker. This could avoid unexpected accesses to the app-render Fixes #51482 Fixes #50232 Closes #51506 Reverts changes in #51172 fix NEXT-1260 -
Jiachi Liu authored
When conflicted pages occur between app and pages server used to throw error and you need to solve the conflicts and restart the server. This PR capture the error during files aggregation, and send to client to display the error for files confliction. This will send all the conflicts to client and it will still error until you solve all of them. But since the server is not stuck by errors, client can recover once the error is solved. Closes NEXT-1283
-
Jiachi Liu authored
The next-metadata-route-loader emitted content with `"next/server"` is still using cjs version which is not get tree-shaked on edge runtime, This PR adds a new esm entry for it and mapped it that on edge runtime so unused exports can be tree-shaked. This case happened when users are using ImageResponse from `"@vercel/og"` instead of `"next/server"`. 2nd change is adding another alias to map `@vercel/og` package to vendored og package inside next.js, this way we could merge the two package instead of bundled both of them Fixes: NEXT-1303 changed `require.reoslve("next/dist/xxx")` to `${NEXT_PROJECT_ROOT}/xxx}` to avoid to be traced by nft. -
JJ Kasper authored
Similar to `getStaticProps` when draft mode is enabled we should bypass the cache so fresh data is shown. x-ref: [slack thread](https://vercel.slack.com/archives/C052BQ8F9EJ/p1687440125828479?thread_ts=1684336597.437409&cid=C052BQ8F9EJ) and [tweet](https://twitter.com/tomus_sherman/status/1669023879656873988) --------- Co-authored-by:
Steven <steven@ceriously.com>
-
Delba de Oliveira authored
Nvm, it doesn't work.
-
Delba de Oliveira authored
-
vercel-release-bot authored
-
Delba de Oliveira authored
Bring back the previous setting so specific team members get tagged on all PRs.
-
Tyler Lutz authored
### What? Adds missing "DO NOT EDIT" comment to some of the shared documentation pages" ### Why? A few of the shared documentation files didn't have the comment to not edit them.
-
Delba de Oliveira authored
-
JJ Kasper authored
Reverts vercel/next.js#51631 This breaks the windows builds x-ref: https://github.com/vercel/next.js/actions/runs/5344032749/jobs/9687974376 x-ref: https://github.com/vercel/next.js/actions/runs/5344032749/jobs/9687973522
-
Wyatt Johnson authored
Continuing on changes to move the rendering logic into the bundles. - Unifies edge render functions: `appRenderToHTML` and `pagesRenderToHTML` becomes `renderToHTML` - When an error occurs, the error module's match is used so the module's internal render can be used (easing transition away from using the server's render method) - Improved test resiliance
-