- 02 Jul, 2021 12 commits
-
-
JJ Kasper authored
-
Maia Teegarden authored
This decreases the body size limit that triggers a warning from 5MB -> 4MB, which provides a little more wiggle room. Certain things like using base64 on body, headers, path, etc can cause the response to be larger than initially calculated. Initial PR: https://github.com/vercel/next.js/pull/26831
-
Angelo Ashmore authored
The CDN URL is the recommended URL for the Prismic REST and GraphQL APIs. ## Documentation / Examples - [x] Make sure the linting passes
-
JJ Kasper authored
This ensures when an error occurs in an API route while using minimal mode the error is bubbled so it can be handled at the top-level ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
-
Paweł Tymczuk authored
This fixes the React warning: `Warning: Each child in a list should have a unique "key" prop.` that is thrown when using the `Script` components with the `beforeInteractive` strategy. Fixes: #26618
-
Maia Teegarden authored
This PR adds a warning when api responses exceed 5mb since this will end up failing once deployed. In a future version this scenario will throw an error. ## Bug - [x] Integration tests added ## Documentation / Examples - [x] Make sure the linting passes
-
hiro authored
- Fix typo on "occured" to "occurred"
-
Lee Robinson authored
So there's _conformance_ between the other docs / optimizations.
-
Tim Neutkens authored
Co-authored-by:kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Alex Castle authored
fixes #26607 This change makes it so the image loader plugin only emits a file while processing an image import for the client. The final generated image URL was already the same in SSR and CSR anyway, so this change doesn't have any functional impact. I also changed the name of the static page in the image component tests, since it was causing some conflicts with the static assets folder.
-
Paul van den Dool authored
## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added ## 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 - [x] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. ## Documentation / Examples - [ ] Make sure the linting passes ## Why the change I lost quite a few hours figuring out why my environment variable was `undefined` in the browser. I read about the built-in support and was like: "Oh nice" and didn't read much further. I missed the part about how you need to prefix your variables with `NEXT_PUBLIC_` in order to expose them to the browser. I think a hint to this in the anchor link to that section will make it more discoverable as it's then mentioned near the top and will save people who are like me some time and a headache.
-
Tim Neutkens authored
Co-authored-by:
Jiachi Liu <inbox@huozhi.im> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
- 01 Jul, 2021 13 commits
-
-
JJ Kasper authored
-
Steven authored
* Update `publish-canary` script to include checkout * Update contrib with publishing section
-
Steven authored
Fixes #26587
-
Steven authored
Adding additional tests. Follow up to #26705
-
Artur Sedlukha authored
Fix after https://github.com/vercel/next.js/pull/26133
-
Joachim Viide authored
This pull request adds "Vary: Accept" header to responses from the image optimizer (i.e. the /_next/image endpoint). The image optimizer prefers re-encoding JPG files to WebP, but some browsers (such as Safari 14 on Catalina) do not yet support WebP. In such cases the optimizer uses the Accept header sent by the browser to send out a JPG response. Thus the optimizer's response may depend on the Accept header. Potential caching proxies can be informed of this fact by adding "Vary: Accept" to the response headers. Otherwise WebP data may be served to browsers that do not support it, for example in the following scenario: * A browser that supports WebP requests the JPG. The optimizer re-encodes it to WebP. The proxy caches the WebP data. * After this another browser that doesn't support WebP requests the JPG. The proxy sends the WebP data to the browser. - [x] Integration tests added - [x] Make sure the linting passes
-
Steven authored
This adds a new prop, `onLoadingComplete()`, to handle the most common use case of `ref`. I also added docs and a warning when using `ref` so we recommend the new prop instead. - Fixes #18398 - Fixes #22482
-
JJ Kasper authored
This fixes the `font-optimization` test failing from the links/content changing slightly in the snapshot. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added ## 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. ## Documentation / Examples - [ ] Make sure the linting passes
-
Jiachi Liu authored
Co-authored-by:
Tobias Koppers <tobias.koppers@googlemail.com> Co-authored-by:
Tim Neutkens <tim@timneutkens.nl>
-
JJ Kasper authored
-
D. Kasi Pavan Kumar authored
## Bug - [ ] ~~Related issues linked using `fixes #number`~~ - [ ] ~~Integration tests added~~ ## 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.~~ ## Documentation / Examples - [x] Make sure the linting passes
-
JJ Kasper authored
-
Jiachi Liu authored
## Enhance simplify detection for visiting `_error` x-ref: #26610
-
- 30 Jun, 2021 10 commits
-
-
JJ Kasper authored
-
JJ Kasper authored
-
Nils Schönwald authored
## Bug fixes #26309 ## Documentation / Examples see #26309 - [ ] Make sure the linting passes
-
Steven authored
This solves the main use case from Issue #19914. Previously, we would set the `Cache-Control` header to a constant and rely on the server cache. This would mean the browser would always request the image and the server could response with 304 Not Modified to omit the response body. This PR changes the behavior such that the `max-age` will propagate from the upstream server to the Next.js Image Optimization Server and allow browser caching. ("upstream" meaning external server or just an internal route to an image) This PR does not change the `max-age` for static imports which will remain `public, max-age=315360000, immutable`. #### Pros: - Fewer HTTP requests after initial browser visit - User configurable `max-age` via the upstream image `Cache-Control` header #### Cons: - ~~Might be annoying for `next dev` when modifying a source image~~ (solved: use `max-age=0` for dev) - Might cause browser to cache longer than expected (up to 2x longer than the server cache if requested in the last second before expiration) ## Bug - [x] Related issues linked using `fixes #number` -
JJ Kasper authored
* Disable build-output size specific tests * remove size-limit test * lint-fix
-
Jiachi Liu authored
* fix: react 18 new hydration API * support react 18 * compat latest react only, fix resolved version * fix tests * Some changes based on https://github.com/reactwg/react-18/discussions/5 * fix test Co-authored-by:
Tim Neutkens <timneutkens@me.com> Co-authored-by:
kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Tim Neutkens authored
* Move next-server directory files to server directory * Update tests * Update paths in other places
-
Tim Neutkens authored
-
Tim Neutkens authored
-
Tim Neutkens authored
-
- 29 Jun, 2021 5 commits
-
-
Gerald Monaco authored
`next-dev-server` having its own implementations of `renderToHTML` and `renderErrorToHTML` has historically made reasoning about streaming hard, as it adds additional places where status codes are explicitly set and the full HTML is blocked on. Instead, this PR simplifies things considerably by moving the majority of the custom logic for e.g. hot reloading and on-demand compilation to when we're resolving the page to be loaded, rather than upfront when handling the request. It also cleans up a few other details (e.g. default error page rendering) that managed to creep into the base implementation over time. One unfortunate side effect is that this makes compilation errors slightly more difficult. Previously, we'd render them directly. Now, we have to rethrow them. But since they've already been logged (by the watch pipeline), we have to make sure they don't get logged again.
-
Soham Shah authored
## Bug - [X] Related issues linked using `fixes #26713 ` ## 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. ## Documentation / Examples - [X] Make sure the linting passes ## Screenshots After this small change the warning disappears. 
-
Houssein Djirdeh authored
Adds `--max-warnings` flag to `next lint` to enable setting of a maximum warning threshold. Fixes #26671
-
hiro authored
* fix: typo occured -> occurred * fix: typo occured -> occurred * fix: typo occured -> occurred * fix: typo occured -> occurred * lint-fix Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Lee Robinson authored
* Update layouts example * Update examples/layout-component/components/layout.js Co-authored-by:JJ Kasper <jj@jjsweb.site>
-