- 09 Feb, 2022 9 commits
-
-
JJ Kasper authored
-
Jiachi Liu authored
Fix the wrong filename evaluation of `MIDDLEWARE_FLIGHT_MANIFEST` in required files. Besides checking the generated files, check if they're declared correctly in `required-server-files.json`
-
JJ Kasper authored
-
Xavier Haniquaut authored
## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint`
-
Steven authored
-
Gerald Monaco authored
Since we want to use the streaming renderer when `reactRoot: true`, we have to make sure we use the right server implementation too.
-
Jiachi Liu authored
We need to switch to json flight manifest on node deployment for RSC
-
JuniorTour authored
fix: image config not work for `node_modules` Co-authored-by:Steven <steven@ceriously.com>
-
Luis Alvarez D authored
Added a mention that `fallback: true` behaves like `fallback: 'blocking'` back into docs. It was originally added in https://github.com/vercel/next.js/pull/29121. ## Feature - [x] Documentation added ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint` Co-authored-by:
Steven <229881+styfle@users.noreply.github.com>
-
- 08 Feb, 2022 17 commits
-
-
JJ Kasper authored
This updates to leverage our `response-cache` used for ISR for our `image-optimizer` as well. Co-authored-by:Steven <steven@ceriously.com>
-
JJ Kasper authored
Seems these were failing from https://example.com randomly 404ing x-ref: https://github.com/vercel/next.js/runs/5113528980?check_suite_focus=true#step:8:1465 x-ref: https://github.com/vercel/next.js/runs/5095808948?check_suite_focus=true x-ref: https://github.com/vercel/next.js/runs/5086862695?check_suite_focus=true
-
hackerman authored
See also the merged https://github.com/vercel/examples/pull/40 ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint`
-
Jiachi Liu authored
-
Shu Ding authored
* polyfill pipeTo * add pipeThrough * covert pipeThrough calls * use pipe * invert logic Co-authored-by:
Jiachi Liu <inbox@huozhi.im> Co-authored-by:
kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Shu Ding authored
We need to check if the render result is dynamic or not, before using `pipe`.
-
Gerald Monaco authored
As per React 18 recommendation, we should use e.g. `renderToReadableStream` whenever we use `createRoot`. This is particularly important for currently supported suspense features like `React.lazy` to work properly during SSR. However, unless you have opted in to streaming support (via [the `runtime` flag](https://github.com/vercel/next.js/pull/34068)), we will wait until `onCompleteAll` before sending it (via the `generateStaticHTML` flag). --- Fixes #33879
-
Jiachi Liu authored
The `export default xxx` statement is slightly different from estree when exporting an arrow function instead of identifier in swc. We also need to capture arrow exports.
-
Syed Basim authored
Add pnpm debug (`.pnpm-debug.log`) file in gitignore templates.
-
Tim Neutkens authored
## 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 `yarn lint`
-
Shu Ding authored
We should remove `.next` after checking the manifest file here. ## 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 `yarn lint`
-
Tobias Koppers authored
fixes #25484 fixes #34064 ## Bug - [x] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
-
Tim Neutkens authored
Fixes #33476 I've added the test for this but it passes either way, even when the change to loadable.js is not made. On the reproduction I was able to reproduce it consistently and it's fixed with this change. ## 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 `yarn lint`
-
Shu Ding authored
-
Donny/강동윤 authored
This applies - https://github.com/swc-project/swc/pull/3462 This resolves https://github.com/vercel/next.js/discussions/30237#discussioncomment-2114870 - https://github.com/swc-project/swc/pull/3463 This resolves https://github.com/vercel/next.js/discussions/30237#discussioncomment-2109335 - https://github.com/swc-project/swc/pull/3480 This resolves https://github.com/vercel/next.js/discussions/30237#discussioncomment-2068850
-
JJ Kasper authored
-
JJ Kasper authored
-
- 07 Feb, 2022 9 commits
-
-
Gerald Monaco authored
These should no longer need to be exposed.
-
Gerald Monaco authored
Make the external `Router` state immutable, and make it so there's only one place (`set`) where it is changed and announced. This is to prepare for #33919, which ensures that we only create a new router once per tree.
-
Tim Neutkens authored
Given we've spent a ton of time testing and fixing minifier bugs the majority of cases should now be covered. ## 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 `yarn lint`
-
11koukou authored
Fixed lazyRoot functionality (#33290). Changed the unique id for Intersection Observers discrimination since previously they were only identified by the different rootMargins, now each being identified by the rootMargin and the root element as well Added more Images to the test with different margins and with/without lazyRoot prop. Browser correctly initially loading two of the four Images according to the props' specifications. Co-authored-by:Steven <steven@ceriously.com>
-
Balázs Orbán authored
The lock and stale actions will always fail on fork repos since they are using secrets that are not shared with the fork workflow runs. This PR addresses that by limiting the lock and stale actions to bail out on fork repo workflow runs. ## 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 `yarn lint`
-
Tim Neutkens authored
- Add support for async function / promise export in next.config.js/.mjs - Update docs Adds support for https://twitter.com/timneutkens/status/1486075973204422665 But also the simpler version: ```js module.exports = async () => { return { basePath: '/docs' } } ``` ## 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. - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Documentation added ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
-
JJ Kasper authored
-
Wouter Raateland authored
* Allow scroll prevention on hash change Currently, `scrollToHash` is performed on every hash change, even when this change is caused by `<Link scroll={false} {...props} />`. This change prevents scrolling in this case and allows users to specify the desired scrolling behavior in the router's `hashChangeComplete` event. * Add test case and apply fixes Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Adam Pietrasiak authored
Currently, if you render `next/link` like ```ts <Link> <CustomComponent /> </Link> ``` and have ```tsx interface Props { onClick?: () => void; // <— note we're not passing event as an argument } function CustomComponent({ onClick }: Props) { return <div onClick={() => onClick?.()}>Hello</div> } ``` It'll result in error ``` link.js?f421:21 Uncaught TypeError: Cannot read property 'defaultPrevented' of undefined ``` <!-- 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 - [ ] 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 Co-authored-by:JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
- 06 Feb, 2022 5 commits
-
-
Glenn Gijsberts authored
## Description This year we implemented the new Apollo config using this example. We recently moved to `getServerSideProps` as well, however, this was giving us some cache problems. The issue was that the cache was older than the actual data that was coming from the server side query. Because the `merge` of the cache in `apolloClient.js` is merging the existingCache in the initialState it will overwrite the "fresh" initialState with properties that already exists. This means that if you have something in your cache from previous client render, for example `user` with the value `null`, and you go to a new page and do a new query on the server which returns a value for the `user` field, it will still return `null` because of that `merge` function. Since this was weird in our opinion, we've changed this in our own environment by always overwriting the existing cache with the new initialState, so that the initialState that is coming from a fresh server side query is overwriting. We thought it was a good idea to reflect this also in this example, because we couldn't think of a reason why the existing cache should overwrite fresh queries. I've added a reproduction that shows what this is exactly about. I hope my description makes sense, let me know what you think! ## Reproduction of old scenario Created a reproduction branch here: https://github.com/glenngijsberts/with-apollo-example. Using a different API than in the example, because of https://github.com/vercel/next.js/issues/32731. 1. checkout the example 2. yarn 3. yarn dev 4. visit http://localhost:3000/client-only 5. Hit "Update name". This will run a mutation that will update the cache automatically. Because I use a mocked API, the actual value on the API won't be updated, but this is actually the perfect scenario for the problem because in reality data can already change in the meantime when you're doing a new request. 6. Go to the SSR page 7. This will display two values: one is coming from the server side request (which is the latest data, because no cache is used in `getServerSideProps`) and the other is using the cache, which is outdated at that point, yet it's still returned because the old way of merging the cache was picking the existing cache over the initialState that was coming from the fresh server side query. ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint`
-
Neeraj Rajpurohit authored
Fixes: https://github.com/vercel/next.js/issues/31240 Closes: https://github.com/vercel/next.js/pull/32324 Adding a try-catch block to handle situations when packages are found at relative path in getPackagePath function. This is likely to occur when using `preact` instead of `react-dom`, as `scheduler` package will not be found wrt `react-dom` ## Bug - [x] Related issues linked using `fixes #31240` Co-authored-by:
JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
Jess Telford authored
My team & I keep asking the question "What order are env vars _actually_ loaded in?". This addition surfaces the order in a clear and readable way without having to read and understand the entire "Environment Variables" documentation first. ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint` Co-authored-by:JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
Kumar Deepanshu authored
## 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 `yarn lint` Co-authored-by:JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
Chris Midgley authored
If you don't have any config, currently you need to pass `{}`, which is less convenient than being able to pass nothing.
-