- 03 Nov, 2020 12 commits
-
-
Joe Haddad authored
-
Steven authored
-
Joe Haddad authored
-
JJ Kasper authored
This ensures we don't render the page un-necessarily when a redirect is returned from `getStaticProps` or `getServerSideProps`. Possibly related: https://github.com/vercel/next.js/issues/18735 Closes: https://github.com/vercel/next.js/issues/18747
-
Eric Burel authored
-
Aral Roca Gomez authored
Co-authored-by:Joe Haddad <joe.haddad@zeit.co>
-
Lee Robinson authored
Updates https://nextjs.org/docs/migrating/from-gatsby to mention the new `next/image` component released in Next.js 10.
-
Joe Haddad authored
Next.js would try to "recover" if its CSS assets went missing (i.e. a deployment occured) **while the page was initially loading**. This handled a rare case where we'd try to let the Next.js complete hydrating even though a deployment occured. However, in practice, this never worked: if the `fetch()` failed, that means the original assets never downloaded themselves (because the `fetch()` should be coming from disk cache). Instead of letting Next.js get itself into a weird state, let's just stop hydration so that the page doesn't accidentally delete its styles. The handle-no-styles behavior is already tested in `test/integration/css/test/index.test.js`. There was never a branch for it using its cached styles, so nothing else needs updated. --- Fixes #17930
-
khades authored
Serverside Dynamically loaded CSS module file insertion adds css-files as usual static files with special data-n-p tag, that is used in page transition logic. That files get removed on page transition cause they are not explicitly required in scope of page. Mini-css-extract-plugin adds style tags at chunk insertion without any tags and leave them be, no matter how many page transitions were made. I removed data-n-p tag from dynamically loaded css module files and added new data-n-d tag for it. Fixes #16950
-
Joe Haddad authored
-
JJ Kasper authored
This ensures the `basePath` property works correctly when a multi-level value is defined (`/hello/world`) Fixes: https://github.com/vercel/next.js/issues/17889
-
Steven authored
- Update default `deviceSizes` - Add default `imageSizes` - Use `layout` value to determine which `srcset` to use Fixes #18420 Closes #18714
-
- 02 Nov, 2020 14 commits
-
-
JJ Kasper authored
This makes sure we don't incorrectly strip locale characters from the path if it is not a locale prefix e.g. `/fr` should not be removed from `/frank`. Additional tests have been added to ensure this isn't stripped for this case. Fixes: https://github.com/vercel/next.js/issues/18332
-
JJ Kasper authored
When visiting a non-locale prefixed path (`/hello` instead of `/fr/hello`) we don't trigger locale redirects currently so if another locale is matched we need to ensure this is reset to the `defaultLocale` for rendering to prevent a mis-match on the client and the server. This also fixes hydration errors from occurring with `asPath` for `getServerSideProps` pages due to `normalizeLocalePath` expecting only a pathname and `asPath` containing `hash` and `query values also. Fixes: https://github.com/vercel/next.js/issues/18337 Fixes: https://github.com/vercel/next.js/issues/18510
-
JJ Kasper authored
This adds support for passing `statusCode` in a `redirect` from `getServerSideProps` or `getStaticProps` which matches the `redirect` shape allowed to be returned for `redirects` in `next.config.js` Closes: https://github.com/vercel/next.js/issues/18350
-
JJ Kasper authored
Closes: https://github.com/vercel/next.js/issues/18694
-
JJ Kasper authored
This ensures we don't detect the locale from the header when `localeDetection` is set to `false` Fixes: https://github.com/vercel/next.js/issues/18482
-
JJ Kasper authored
This corrects additional fallback pages being generated without the fallback flag causing `getStaticProps` to be called without params with i18n. The revalidation aspect of the issue has been corrected separately in https://github.com/vercel/next.js/pull/18569 Fixes: https://github.com/vercel/next.js/issues/18404
-
JJ Kasper authored
This ensures the `html` tag's `lang` attribute is updated on client-transition when the locale is changing Fixes: https://github.com/vercel/next.js/issues/18452
-
JJ Kasper authored
* Ensure preload works correctly with locale option * Fix conditional import * Update size-limit tests * DCE some code * Resolve merge error Co-authored-by:Tim Neutkens <timneutkens@me.com>
-
JJ Kasper authored
This updates the documentation with the new `redirect` and `notFound` return values adding `redirect` to the `getStaticProps` section and adding a new section describing the return values allowed for `getServerSideProps` Closes: https://github.com/vercel/next.js/pull/18626 Closes: https://github.com/vercel/next.js/issues/18691
-
Joe Haddad authored
Fixes #18643
-
Joe Haddad authored
-
Carmelo Scandaliato authored
Co-authored-by:kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
https://err.sh/nextjsShun Kakinoki authored
Hi next.js team! Was trying out the canary and came across the error! The redirect to https://err.sh was to `https://github.com/vercel/nextjs`, not `https://github.com/vercel/next.js`
-
Steven authored
In PR #18147, we fixed the default loader to prevent upscaling images. This PR fixes the same bug for 3rd party loaders. --- Fixes #18648
-
- 01 Nov, 2020 9 commits
-
-
Steven authored
Older versions of Safari (and other browsers) do not support webp format so we were incorrectly falling back to png. This PR fixes #18509 so that we fallback to the original image format if a modern format like webp was not explicitly provided in the Accept header. Tests were added to ensure that the Accept header for Safari, Firefox, and Chrome work properly.
-
Joe Haddad authored
-
Joe Haddad authored
-
Minh Tu Le authored
Our code uses `core-js` to polyfill and because core-js [`es.symbol.description`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.description.js#L14-L16) doesn't just check for `Symbol.prototype.description`, it will try to polyfill again but fail to do so because Next.js polyfill is not configurable. By default, `Object.defineProperty` set `configurable` to `false`. Here are the screenshots of the error on Edge 44.18362.449.0 using Next.js v10.0.1-canary.1  
-
JJ Kasper authored
This makes sure we don't use invalid `x-now-route-matches` which can occur when `i18n` default locale is visited and a prerendered page is matched. To correct this we first check if we are able to derive the correct params from the URL and then bail on parsing `x-now-route-matches` if we are. Additional test cases are being added in the builder to ensure we don't regress on this x-ref: https://github.com/vercel/next.js/discussions/18443 Fixes #18602
-
Jan Potoms authored
-
Lukáš Huvar authored
Co-authored-by:Joe Haddad <joe.haddad@zeit.co>
-
Joe Haddad authored
-
Steven authored
-
- 31 Oct, 2020 2 commits
-
-
Joe Haddad authored
This PR deprecates the `unsized` property from NextImage because the property did not accomplish the desired effect. Users should rely on one of the new layouts instead: - `<Image layout="fixed" />` - `<Image layout="intrinsic" />` - `<Image layout="responsive" />` - `<Image layout="fill" />` The `unsized` property will continue to work as-is in production but is deprecated and will throw in dev. --- ### TODO: - [x] test `layout=fill` in typescript types - [x] test `layout=fill` render behavior - [x] test that `unsized` switches to `layout=fill` - [x] test `next dev` erroring on `unsized` - [ ] layout docs (tracked in issue #18554) - [ ] both `layout=fill` and `layout=responsive` use all deviceWidths in the srcset --- Fixes #18541 Co-authored-by:Steven <steven@ceriously.com>
-
Joe Haddad authored
-
- 30 Oct, 2020 3 commits
-
-
Daniel Treviño authored
Co-authored-by:kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
ospira authored
* small tweaks for those testing on an existing site with missing author or featured image on posts When migrating WordPress or using an exisitng site, sometimes you have published posts wth missing data. The graphql plugin will properly resolve these to null, but some of existing code accessing tries to access the node property on these null values. I've made these properties optional in the pages and also tweaked some of the components along similar lines. * Lint fix Co-authored-by:
Luis Alvarez <luis@vercel.com> Co-authored-by:
kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Yudai Oriver K authored
Fixes #18523 ## description The i18n-routing Vercel deploy button URLs was: https://vercel.com/import/project?template=https://github.com/vercel/next.js/tree/canary/examples/amp So, I fixed the URLs for examples/i18n-routing: https://vercel.com/import/project?template=https://github.com/vercel/next.js/tree/canary/examples/i18n-routing
-