- 07 7月, 2020 3 次提交
-
-
由 Christian Alfoni 提交于
-
由 James Mosier 提交于
Fast Refresh doesn't appear to work with older version (16.8.x) versions of React. I was able to reproduce this via this issue https://github.com/vercel/next.js/issues/14895 I updated all examples I found of React `16.8.x` to `^16.13.1` so that future installs will auto bump to the latest minor version. Previously the pinned version was causing the lock of version.
-
由 Asher Foster 提交于
Co-authored-by: NJoe Haddad <timer150@gmail.com> Co-authored-by: NTim Neutkens <timneutkens@me.com>
-
- 06 7月, 2020 4 次提交
-
-
由 JJ Kasper 提交于
This updates the scroll position saving to occur as the scroll position changes instead of trying to do it when the navigation is changing since the `popState` event doesn't allow us to update the leaving history state once the `popState` has occurred. The order of events that was previously attempted to save scroll position on a `popState` event (back/forward navigation) 1. history.state is already updated with state from `popState` 2. we replace state with the currently rendered page adding scroll info 3. we replace state again with the `popState` event state overriding scroll info Using this approach the above event order is no longer in conflict since we don't attempt to populate the state with scroll position while it's leaving the state and instead do it while it is still the active state in history This approach resembles existing solutions: https://www.npmjs.com/package/scroll-behavior https://twitter.com/ryanflorence/status/1029121580855488512 Fixes: https://github.com/vercel/next.js/issues/13990 Fixes: #12530 x-ref: https://github.com/vercel/next.js/pull/14075
-
由 Tim Neutkens 提交于
Fixes #14452
-
由 Tim Neutkens 提交于
Fixes #14453
-
由 Tim Neutkens 提交于
-
- 05 7月, 2020 1 次提交
-
-
由 matamatanot 提交于
-
- 04 7月, 2020 1 次提交
-
-
由 Tom Dohnal 提交于
This resolves https://github.com/vercel/next.js/issues/12713 and https://github.com/vercel/next.js/issues/12722
-
- 03 7月, 2020 3 次提交
-
-
由 Tim Neutkens 提交于
-
由 Tim Neutkens 提交于
Co-authored-by: NJoe Haddad <timer@zeit.co> Co-authored-by: NJoe Haddad <joe.haddad@zeit.co>
-
由 Darsh Patel 提交于
Fixes: #13512 Defined and exported type for `metric` used in [reportWebVitals](https://nextjs.org/docs/advanced-features/measuring-performance) ``` export function reportWebVitals(metric) { if (metric.label === 'custom') { console.log(metric) // The metric object ({ id, name, startTime, value, label }) is logged to the console } } ``` One can now do ``` import { NextWebVitalsMetric } from 'next/app' export function reportWebVitals(metric: NextWebVitalsMetric ) { if (metric.label === 'custom') { console.log(metric) // The metric object ({ id, name, startTime, value, label }) is logged to the console } } ```
-
- 02 7月, 2020 5 次提交
-
-
由 JJ Kasper 提交于
Co-authored-by: Nkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
由 Jan Potoms 提交于
Convert `Link` to a function component. Prefetch logic and memoized url formatting now meshes nicely with React hooks. Class methods were hoisted to module scope to preserve performance characteristics.
-
由 JJ Kasper 提交于
Since the no-op rewrite is a valid rewrite used to check pages/assets before adding a 404-rewrite this makes sure we don't show the rewriting to auto-export dynamic pages warning from it Closes: https://github.com/vercel/next.js/issues/14736
-
-
由 Tim Neutkens 提交于
-
- 01 7月, 2020 7 次提交
-
-
由 Tim Neutkens 提交于
Webpack 5 supports a single runtimechunk for the Node.js compilation, this solves sharing modules between entrypoints.
-
由 Tim Neutkens 提交于
Fixes #11711 Also cleaned up some extra code. This was already supported on the Vercel edge network.
-
由 Lindsey Simon 提交于
Fix CSS `display` on login link.
-
由 muslax 提交于
-
由 JJ Kasper 提交于
-
由 JJ Kasper 提交于
This makes sure to base64 encode the `.env*` file contents before passing them in the URL for the serverless-loader since `!` is a special character in this case which can cause webpack to fail to build Closes: https://github.com/vercel/next.js/issues/14749
-
由 Luis Alvarez D 提交于
Updated the example to use server only variables inside `getStaticProps`
-
- 30 6月, 2020 14 次提交
-
-
由 Joe Haddad 提交于
-
由 Darsh Patel 提交于
Fix super minor typo in cms-sanity example readme
-
由 Joe Haddad 提交于
Fixes #12291 ![image](https://user-images.githubusercontent.com/616428/85499698-176b4900-b5b0-11ea-8a5d-a7f0b4c20307.png)
-
由 Darsh Patel 提交于
Added an Example using MongoDB's Realm-Web SDK ![Screenshot 2020-06-25 at 5 25 49 PM](https://user-images.githubusercontent.com/11258286/85715292-ebafa680-b708-11ea-98bd-d8d64701f0af.png) Fixes #14417
-
由 Yang Sun 提交于
Fixes #14464
-
由 Jan Potoms 提交于
* avoid pulling code in the bundle for `trailingSlash` logic when it's not enabled * avoid cloning the url an extra time if normalizing the path doesn't change it
-
由 Jan Potoms 提交于
Avoid trailing slashes on urls that look like files. The redirect for `trailingSlash: true` will now look like: ``` Redirects ┌ source: /:path*/:file.:ext/ ├ destination: /:path*/:file.:ext └ permanent: true ┌ source: /:path*/:notfile([^/.]+) ├ destination: /:path*/:notfile/ └ permanent: true ``` The default still looks like: ``` Redirects ┌ source: /:path+/ ├ destination: /:path+ └ permanent: true ``` After this gets merged, I have a few optimizations planned on the normalization code that should reduce the client bundle a little and that consolidates the `trailingSlash` and `exportTrailingSlash` options
-
由 ralphilius 提交于
-
由 Joe Haddad 提交于
-
由 Joe Haddad 提交于
Fixes #14632 Fixes #14690
-
由 Arsalan Khattak 提交于
Change Data Fetching Method in Example with-mongodb-mongoose Fetch Data on Runtime (getServerSideProps) rather than Build Time (getStaticProps)
-
由 Joe Haddad 提交于
-
由 Pascal Pixel 提交于
The existing example gives an error on every hot reload, perhaps because of the way that an initial `useEffect` hook imports the `GLTFLoader` and it doesn't redo that on hot reload? Putting the component using the `useLoader` hook in a dynamic import seems to fix this. Open to better suggestions, this is kind of awkward to use still...
-
由 Joe Haddad 提交于
Closes #14682
-
- 29 6月, 2020 2 次提交
-
-
由 JJ Kasper 提交于
-
由 JJ Kasper 提交于
This updates `fetchNextData` to re-use the `getDataHref` function from `page-loader` which has more verbose handling to ensure the correct `/_next/data` URL is built. Re-using this logic ensures the `/_next/data` URL can still be built even when a mismatching `href` and `as` value is provided to `next/link`. This also fixes a case in `getDataHref` where optional values that weren't provided would fail to build the data href since the check requiring the param be present while interpolating the route values hasn't been updated to allow missing params for optional values. An additional test case has been added to the prerender suite to ensure the `/_next/data` URL is built correctly when mismatching `href` and `as` values are provided x-ref: https://github.com/vercel/next.js/discussions/14536 x-ref: https://github.com/vercel/next.js/discussions/9081#discussioncomment-31160 Closes: https://github.com/vercel/next.js/issues/14668
-