- 27 Sep, 2022 6 commits
-
-
JJ Kasper authored
-
JJ Kasper authored
Fixes: https://github.com/vercel/next.js/issues/40927 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md`
-
Donny/강동윤 authored
This PR updates swc crates to https://github.com/swc-project/swc/commit/3d393dd709f9a41dc53b15c0fc1edb93997f9d5b --- This PR applies - https://github.com/swc-project/swc/pull/5954 Closes https://github.com/vercel/next.js/issues/40803 - https://github.com/swc-project/swc/pull/5956 Resolves https://github.com/vercel/next.js/discussions/30237#discussioncomment-3717121
-
Bruno Crosier authored
Currently, a developer building a website using Next.js could write this code with no type errors: ```tsx <Image width="kangaroo" height="100px" quality="medium" {...rest} /> ``` This PR adds stricter type checking, which will catch this type of error earlier. Similarly, this PR adds stricter types for the `responseLimit`, to ensure the types align to: https://nextjs.org/docs/messages/api-routes-response-size-limitCo-authored-by:Steven <steven@ceriously.com> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
JJ Kasper authored
We already have quite a few PnP tests so this removes one of them that is causing issues with unrelated PRs. x-ref: https://github.com/vercel/next.js/actions/runs/3131979254/jobs/5084663564
-
JJ Kasper authored
Reverts vercel/next.js#40732 x-ref: https://github.com/vercel/next.js/pull/40732#issuecomment-1258779835
-
- 26 Sep, 2022 14 commits
-
-
JJ Kasper authored
Bumps the version for the legacy `with-typescript` example as it's behind our recommended TypeScript version. We can investigate aliasing this example to the default template in a follow-up. ## Documentation / Examples - [x] 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) x-ref: https://github.com/vercel/next.js/pull/40863#issuecomment-1258771279
-
Jimmy Lai authored
# Context 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: --> ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [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` ## 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:
JJ Kasper <jj@jjsweb.site> Co-authored-by:
Shu Ding <g@shud.in>
-
Jiachi Liu authored
### Issue When import an esm package in client component, and use it in server component page, it will fail to SSR but render successfully on client. It's because the import to esm package will make the client chunk become an **async module** since esm module will be treated as **async**. ``` page (serve component) -> local module (client) -> external dependency (esm) ``` Then in react SSR layer, it need the module type information of that chunk, async or not for react so that react could unwrap the async module from `Promise` properly when SSR. ### Solution We need to mark the client entries which are effected by async/esm modules that becoming **async** as `async: true` in SSR manifest. Since flight manifest plugin is only running against client compiler, which doesn't have those module information from server compiler. So we collect the async modules from the **server** compiler **client** layer from flight entry client plugin, then leverage the collection to detect if a module is async in flight manifest plugin for react. ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md`
-
Jiachi Liu authored
Only lint `<head>` elements usage in `pages/`, `<head>` should be able to use in appDir
-
Hannes Bornö authored
Updates the output path so it's the same as when font files are imported in CSS: `url(./font.woff2)` Also adds missing font types to next package. ## 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)
-
Jacob North authored
The old link was cloning the "with-chakra-ui-typescript" repo which has been deprecated. <!-- 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 - [x] Fixed issue with link in README.md
-
Abdallah NourAldin authored
Docs point to old __[hydrate()](https://reactjs.org/docs/react-dom.html#hydrate)__, which had been replaced with __[hydrateRoot()](https://reactjs.org/docs/react-dom-client.html#hydrateroot)__ as React 18 came: > Note: hydrate has been replaced with hydrateRoot in React 18. See [hydrateRoot](https://reactjs.org/docs/react-dom-client.html#hydrateroot) for more info. From [react 18 docs](https://reactjs.org/docs/react-dom.html#hydrate).
-
-
Jaril 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: --> For context, making a test change to allow testing CI changes in https://github.com/vercel/next.js/pull/40910 without approval each run. @ijjk How's this? The string's not being snapshotted so it shouldn't break any tests.
-
Tim Neutkens authored
-
Tim Neutkens authored
-
Tim Neutkens authored
-
Tim Neutkens authored
-
- 25 Sep, 2022 2 commits
-
-
Tim Neutkens authored
-
Tim Neutkens authored
-
- 24 Sep, 2022 3 commits
-
-
Shu Ding authored
Follow-up for #40739 to add an option to opt-out specific packages from being bundled. ## 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)
-
Tim Neutkens authored
As per @sebmarkbage's recommendation. ## 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)
-
Shu Ding authored
When navigating from app to pages, we do a flight render on the server to generate the redirected path. However due to our new bundling strategy we can't use the bundled `ComponentMod.renderToReadableStream` because the component is now a regular component, not a RSC. In that case we have to import the unbundled flight server. ## 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)
-
- 23 Sep, 2022 13 commits
-
-
JJ Kasper authored
x-ref: [slack thread](https://vercel.slack.com/archives/C043ANYDB24/p1663973909118009?thread_ts=1663973783.142799&cid=C043ANYDB24)
-
Donny/강동윤 authored
This PR update swc crates to https://github.com/swc-project/swc/commit/8a5ed1e0baee970a840a3d0e20e5693f653e8edb Noticeable changes include - TS 4.9 support. - Huge performance improvement (of every api).
-
Henrik Wenz authored
## Changes - Updated dependencies - Migrated to typescript - Removed `div` in favour of Fragment - Replaces `var` with `let` since we don't need global hoisting here ## 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)
-
Miguel Afonso authored
We use the variable "SANITY_REVALIDATE_SECRET" on the index page, but the .env.local.example does not have this variable. <!-- 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)
-
CJ Dunteman authored
The latest version of Cypress no longer supports `cypress.json`, use `cypress.config.js` instead. See details in the Cypress [docs](https://docs.cypress.io/guides/references/configuration).
-
Hannes Bornö authored
Allow `export const font = Font()` syntax ## 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)
-
Kiko Beats authored
**TODO** - [x] Ensure [body-stream](https://github.com/kikobeats/next.js/blob/edge-runtime/packages/next/server/body-streams.ts) is up-to-date with https://github.com/vercel/edge-runtime/blob/main/packages/runtime/src/server/body-streams.ts Changelog: https://github.com/vercel/edge-runtime/releases/tag/edge-runtime%401.1.0-beta.33
-
Tim Neutkens authored
-
JJ Kasper authored
-
JJ Kasper authored
This updates to ensure we properly error during static generation when a non-dynamic SSR error is thrown so that unexpected errors are not tolerated. This also fixes the static generation async storage not being shared correctly due to different instances being created during bundling.
-
abdennor authored
I had the same issue, so the fix that worked for me was pulled from this thread https://stackoverflow.com/a/71870995 I have been experiencing the same problem lately with NextJS and i am not sure if my observations are applicable to other libraries. I had been wrapping my components with an improper tag that is, NextJS is not comfortable having a p tag wrapping your divs, sections etc so it will yell "Hydration failed because the initial UI does not match what was rendered on the server". So I solved this problem by examining how my elements were wrapping each other. With material UI you would need to be cautious for example if you use a Typography component as a wrapper, the default value of the component prop is "p" so you will experience the error if you don't change the component value to something semantic. So in my own opinion based on my personal experience the problem is caused by improper arrangement of html elements and to solve the problem in the context of NextJS one will have to reevaluate how they are arranging their html element <!-- 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 - [x] 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:
JJ Kasper <jj@jjsweb.site>
-
David Hay authored
Next.js-hydration now triggered after gtag is initialized. Fixed by adding _document.js and appropriate script elements. --- ## Documentation / Examples - [X] Related issues linked using fixes #40410 - [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) Next.js-hydration now triggered after gtag is initialized.
-
JJ Kasper authored
Follow-up to https://github.com/vercel/next.js/pull/40815 ensures we skip attempting to publish private packages like `next-swc` x-ref: https://github.com/vercel/next.js/actions/runs/3109438515/jobs/5039954716
-
- 22 Sep, 2022 2 commits
-
-
JJ Kasper authored
-
JJ Kasper authored
x-ref: [slack thread](https://vercel.slack.com/archives/C035J346QQL/p1663822388387959) x-ref: https://github.com/vercel/next.js/actions/runs/3108897192/jobs/5038639320 x-ref: https://github.com/vercel/next.js/actions/runs/3107019059/jobs/5034678245 x-ref: https://github.com/vercel/next.js/actions/runs/3104956805/jobs/5030065922
-