- 31 12月, 2020 16 次提交
-
-
由 Lee Robinson 提交于
Building off [this Slack conversation](https://vercel.slack.com/archives/CGD3XGSD7/p1597329727013900), this PR adds a top-level section to the documentation on authentication patterns. Please provide any and all comments! A few open thoughts I have: - ~Should this include code snippets from the related providers or stay very high-level? At what point do we delegate to the examples folder?~ Keep things high level and delegate to examples folder - ~Should this include any related cards at the bottom?~ Added to the bottom - ~Should other places in the documentation link back to here?~ Added link from routing - Should it be a top-level route, or be underneath advanced?
-
由 JJ Kasper 提交于
This ensures we render the locale domain on the `href` when using `next/link` previously the provided `href` was stilling being rendered which differed from the resulting `href` that was navigated to. Fixes: https://github.com/vercel/next.js/issues/20612
-
由 JJ Kasper 提交于
-
由 Guy Bedford 提交于
This upgrades to the version of ncc with subbundling support.
-
由 Greg Rickaby 提交于
* bump dependencies to latest versions * use tailwindcss class names * use next/image component * pass in height & width. update tailwindcss classes * update tailwindcss classes * mention tailwindcss 2.0
-
由 Prateek Bhatnagar 提交于
partially fixes #20341 - Makes sure that font fallback does not get repeated for every request. - Adds a test for the same.
-
由 JJ Kasper 提交于
Follow-up to https://github.com/vercel/next.js/pull/20594 this ensures non-notFound SSG data 404s do cause a hard navigation as this signals a new deployment has occurred and a hard navigation will load the new deployment's version of the page. Closes: https://github.com/vercel/next.js/issues/20623
-
由 Alex Castle 提交于
Co-authored-by: NJoe Haddad <joe.haddad@zeit.co>
-
由 Joe Haddad 提交于
-
由 Joe Haddad 提交于
-
由 Joe Haddad 提交于
The HTML Living Standard explicitly says `href` should be omitted to prevent the loading of an incorrectly sized image: https://html.spec.whatwg.org/multipage/semantics.html#attr-link-imagesrcset ![image](https://user-images.githubusercontent.com/616428/103378205-8a013800-4aaf-11eb-9085-10f547263fed.png) Since it's in the spec, I assume this is valid-enough HTML. This also dedupes preloads which the old implementation did not. --- Fixes #18756 x-ref #19118 Fixes #18720
-
由 mustafaKamal-fe 提交于
* Update dbConnect.js The previous logic was in my opinion prone to errors in situations when different calls to this function from different locations may happen at the same time ( like a race condition ). If the readyState is anything but not 0, then we must not try to perform a new connection as this may cause consequent connections! I hope this makes sense * Update examples/with-mongodb-mongoose/utils/dbConnect.js * Lint fix and minor changes Co-authored-by: NLuis Alvarez D <luis@vercel.com> Co-authored-by: Nkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
由 Tyler Deitz 提交于
This pull request adds an `elements.delete` operation to the `useIntersection`'s cleanup function: `unobserve`. Without this delete operation, next.js holds onto an unreachable reference of every observed element indefinitely (automatically every Link and Image is observed, so that means every rendered Link and Image element adds to the leak). I found this memory leak when building out an infinite feed in next.js with thousands of Link elements. The final code block of the `unobserve` function body: ```tsx // Destroy observer when there's nothing left to watch: if (elements.size === 0) { observer.disconnect() observers.delete(id) } ``` Is effectively unreachable without this delete operation, as the `elements` map will never decrease in size as it is currently. This means that there will always be at least one IntersectionObserver instance in memory if useIntersection has been used once, regardless of if there are currently any components still using the hook.
-
由 Joe Haddad 提交于
https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html > This means that most OLED screens that say they are 3x resolution, are actually 3x in the green color, but only 1.5x in the red and blue colors. Showing a 3x resolution image in the app vs a 2x resolution image will be visually the same, though the 3x image takes significantly more data. Even true 3x resolution screens are wasteful as the human eye cannot see that level of detail without something like a magnifying glass. > ![image](https://user-images.githubusercontent.com/616428/103366340-61b61100-4a90-11eb-9c16-8467f8930247.png) Even the iPhone doesn't have true 3x DPI! related: #18756
-
由 JJ Kasper 提交于
-
由 Joe Haddad 提交于
This pull request makes `Router#push` and `Router#replace` function identically to `<Link />`, i.e. reset scroll when the new render is complete. Users can opt out of this new behavior via: ```tsx const path = '/my-page' router.push(path, path, { scroll: false }) ``` --- Fixes #3249
-
- 30 12月, 2020 17 次提交
-
-
由 Joe Haddad 提交于
Fixes #19935
-
由 Lee Robinson 提交于
Closes https://github.com/vercel/next.js/issues/20036.
-
由 JJ Kasper 提交于
This ensures we detect domain specific locales and redirect them client-side. Tests have been added in the `i18n` suite to ensure the domain redirect is applied correctly during a client-side navigation Fixes: https://github.com/vercel/next.js/issues/19174
-
由 JJ Kasper 提交于
This ensures we detect the `basePath` correctly for the index `basePath` route when either a `hash` or a `query` are present in the provided path. This also adds this specific test to our basePath test suite. Fixes: https://github.com/vercel/next.js/issues/19294 Fixes: https://github.com/vercel/next.js/issues/19437 Closes: https://github.com/vercel/next.js/pull/19444
-
由 JJ Kasper 提交于
This refactors to instead of throwing a specific error when a SSG data route 404s, we return it through props and render the 404 outside of the error handling flow. No additional tests have been added as existing tests should cover this. Closes: https://github.com/vercel/next.js/issues/19243
-
由 Joe Haddad 提交于
This moves the scroll reset behavior to happen synchronously with the DOM commit, instead of a few ticks after the render completes. This is necessary for components that read scroll state on mount. --- Fixes #6462
-
由 JJ Kasper 提交于
This ensures the default path used for the `next/image` component includes the `basePath` when configured. Additional tests have also been added to ensure the image component is working correctly with `basePath` configured. Fixes: https://github.com/vercel/next.js/issues/19711
-
由 matamatanot 提交于
``` images: { domains: ['example.com'], path: 'https://example.com/myaccount/', }, ``` Those `domains` and `path` look a lot alike for me and so, I was confused. I found out that the domains are ignored if the Loader is set, which makes sense.
-
由 Tim Neutkens 提交于
Follow-up to #20357 with additional tracers.
-
由 Joe Haddad 提交于
Fetch is always polyfilled in legacy browsers by `@next/polyfill-nomodule`, so we do not need to import unfetch for IE11 support. Fixes #20588
-
由 Joe Haddad 提交于
Fixes #20585 Closes #20406 as it duplicates Babel dependencies Closes #18926 as it's outdated
-
由 Jorrit Schippers 提交于
Sharp 0.26.3 updates prebuild-install to ^6.0.0 which fixes an incompatibility with NPM 7. See https://github.com/lovell/sharp/pull/2419 and https://github.com/prebuild/prebuild-install/pull/128
-
由 Luis Alvarez D 提交于
* Updated example readme * Updated with-passport example * Updated profile page for with-passport * Updated with-passport-and-next-connect * Updated with-magic * Updated with-magic readme * Updated with-iron-session * Updated next version in with-iron-session Co-authored-by: NLee Robinson <me@leerob.io>
-
由 JJ Kasper 提交于
-
由 Joe Haddad 提交于
This fixes `next/image` to properly ignore inherited styles applied to the `img` tag by a parent element. Image styling should **always** be done by a wrapper element—not to the image itself! --- Fixes #19817 Fixes #19964
-
由 Vojtech Miksu 提交于
[DebugEngine stopped working](https://github.com/styletron/styletron/issues/366) with v9.5 since the devtool is strictly set to eval and this option is not customizable. Unfortunately there is currently no way to fix this.
-
由 Luke Fender 提交于
Fixes: https://github.com/vercel/next.js/issues/15278 > Bug report > When using next dev with emacs, as you develop, emacs creates symbolic link files starting with .# as lock files. Next.js seems to attempt to load these but fails, spewing out errors constantly. Prevents dev server from crashing when emacs creates lockfiles tested with: - GNU Emacs 27.1 - OSX 11.1 - Node v15.4.0
-
- 29 12月, 2020 7 次提交
-
-
由 Joe Haddad 提交于
-
由 JJ Kasper 提交于
Closes: https://github.com/vercel/next.js/issues/20545
-
由 Daniel Yefet 提交于
I don't think the docs should still mention the `priority` prop because the feature no longer exists since this was merged - https://github.com/vercel/next.js/pull/19118 It certainly caught me out!
😬 https://github.com/vercel/next.js/issues/20438 -
由 Joe Haddad 提交于
-
由 Joe Haddad 提交于
-
由 JJ Kasper 提交于
-
由 JJ Kasper 提交于
This removes `import type` usage from our core files since `import type` requires a higher TypeScript version than currently expected. Fixes: https://github.com/vercel/next.js/issues/19300
-