- 17 Aug, 2020 6 commits
-
-
JJ Kasper authored
-
Kristoffer K authored
-
Kevin Mårtensson authored
AMP will still not work correctly when switching between non-AMP and AMP pages in development mode because of https://github.com/vercel/next.js/blob/canary/packages/next/build/babel/plugins/next-page-config.ts#L116-L120. Fixes #15704.
-
JJ Kasper authored
This fixes the incorrect `/_next/data` URL being generated on client transition due to the `as` value passed to `getRouteInfo` having the `basePath` which is used while interpolating the values for dynamic routes, specifically root catch-all routes. A regression test has also been added to ensure this is working Closes: https://github.com/vercel/next.js/issues/15747
-
Tim Neutkens authored
-
Tim Neutkens authored
-
- 16 Aug, 2020 2 commits
-
-
Sergey Rubanov authored
Co-authored-by:
Tim Neutkens <timneutkens@me.com> Co-authored-by:
kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
cargallo authored
Added a section in readme with the proper use of the plugin with next-compose-plugins ^2.0.0, otherwise it doesn't work
-
- 15 Aug, 2020 2 commits
-
-
Tuan Nguyen authored
Just noticed a couple of tiny grammar errors.
-
Rafael Almeida authored
* Update with-storybook example * Delete with-storybook-typescript example * Add TypeScript section to the README Co-authored-by:kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
- 14 Aug, 2020 8 commits
-
-
Joe Haddad authored
-
JJ Kasper authored
This updates to not automatically append params to the query for rewrites if one or more of the params are already used in the destination's path. No other behavior is being changed and if the user still wants the params in the query after using them in the destination's path they can manually add them like with redirects. Closes: https://github.com/vercel/next.js/issues/15626
-
Artem Zakharchenko authored
* Add MSW usage example * Updated example * Added .gitignore * Added .gitignore in the right place lol Co-authored-by:Luis Alvarez <luis@vercel.com>
-
Joe Haddad authored
Instead of reading the `BuildManifest` and passing it to `/_document`, it should be able to read it for itself. --- Fixes #16182
-
Kristoffer K authored
**What's the problem this PR addresses?** https://github.com/vercel/next.js/pull/16048 stopped bundling `caniuse-lite` but didn't declare it as a dependency https://github.com/yarnpkg/berry/runs/972037981?check_suite_focus=true#step:5:75 **How did you fix it?** Add `caniuse-lite` as a dependency --- cc @Timer As mentioned in https://github.com/vercel/next.js/issues/14157#issuecomment-667328984 I looked into adding a PnP e2e test but the use of the `gist` protocol stopped me from getting it to work since v2 doesn't support that yet. Would it be possible to change this to one of the supported protocols (https://yarnpkg.com/features/protocols)? https://github.com/vercel/next.js/blob/636672755004c756eefcddb5d4ccabbc1855e75a/packages/next/package.json#L208
-
Joe Haddad authored
-
Joe Haddad authored
This pull request edits the `BuildManifest` that is sent to `/_document` instead of modifying a single input array to decouple its implementation details. Optimally, we'd eliminate the `files` key all together. --- Related to #16182
-
JJ Kasper authored
-
- 13 Aug, 2020 15 commits
-
-
Joe Haddad authored
-
Joe Haddad authored
-
Joe Haddad authored
-
Joe Haddad authored
Fixes #16166
-
Joe Haddad authored
Really basic one! Needed for `next/client`.
-
Joe Haddad authored
This reduces the code as suggested: https://github.com/vercel/next.js/pull/15231#discussion_r469691649. Removes these bloated Babel helpers: ```diff @@ -678,80 +678,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI var _createClass = __webpack_require__("W8MJ"); - function _createForOfIteratorHelper(o, allowArrayLike) { - var it; - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - if ( - Array.isArray(o) || - (it = _unsupportedIterableToArray(o)) || - (allowArrayLike && o && typeof o.length === "number") - ) { - if (it) o = it; - var i = 0; - var F = function F() {}; - return { - s: F, - n: function n() { - if (i >= o.length) return { done: true }; - return { done: false, value: o[i++] }; - }, - e: function e(_e) { - throw _e; - }, - f: F - }; - } - throw new TypeError( - "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." - ); - } - var normalCompletion = true, - didErr = false, - err; - return { - s: function s() { - it = o[Symbol.iterator](); - }, - n: function n() { - var step = it.next(); - normalCompletion = step.done; - return step; - }, - e: function e(_e2) { - didErr = true; - err = _e2; - }, - f: function f() { - try { - if (!normalCompletion && it["return"] != null) it["return"](); - } finally { - if (didErr) throw err; - } - } - }; - } - - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if ( - n === "Arguments" || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return _arrayLikeToArray(o, minLen); - } - - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) { - arr2[i] = arr[i]; - } - return arr2; - } - exports.__esModule = true; exports.hasBasePath = hasBasePath; exports.addBasePath = addBasePath; @@ -1864,28 +1790,16 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI } // handle resolving href for dynamic routes if (!pages.includes(cleanPathname)) { - var _iterator = _createForOfIteratorHelper(pages), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done; ) { - var page = _step.value; - - if ( - (0, _isDynamic.isDynamicRoute)(page) && - (0, _routeRegex.getRouteRegex)(page).re.test( - cleanPathname - ) - ) { - parsedHref.pathname = addBasePath(page); - break; - } + // eslint-disable-next-line array-callback-return + pages.some(function(page) { + if ( + (0, _isDynamic.isDynamicRoute)(page) && + (0, _routeRegex.getRouteRegex)(page).re.test(cleanPathname) + ) { + parsedHref.pathname = addBasePath(page); + return true; } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } + }); } return parsedHref; @@ -2069,10 +1983,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI } if (cancelled) { - var _err = new Error("Loading initial props cancelled"); - - _err.cancelled = true; - throw _err; + var err = new Error("Loading initial props cancelled"); + err.cancelled = true; + throw err; } return data; ```
-
Tim Neutkens authored
-
JJ Kasper authored
Co-authored-by:Tim Neutkens <timneutkens@me.com>
-
Joe Haddad authored
This PR removes a legacy router method that was used for old-style HMR, now replaced by Fast Refresh. This method was not public: ```tsx export type NextRouter = BaseRouter & Pick< Router, | 'push' | 'replace' | 'reload' | 'back' | 'prefetch' | 'beforePopState' | 'events' | 'isFallback' > ``` Even if someone found this method, it's highly unlikely they could use it successfully—it required the full module object. -
Joe Haddad authored
This PR dedupes the `ComponentRes` type to now align with the `loadPage` return type.
-
Thorsten Schaeff authored
r? @lfades @timothyis cc @kiwicopple @awalias Adding a realtime chat example showing how to implement authentication and realtime data syncing with supabase.io :)
-
madiknox authored
Fixes #14737
-
madiknox authored
This is my very first PR, I'm hoping to contribute more. Should I also remove `renderErrorToHTML` and `renderError`? #14737
-
Joe Haddad authored
-
Joe Haddad authored
-
- 12 Aug, 2020 4 commits
-
-
Joe Haddad authored
Fixes #16131
-
Tim Neutkens authored
We no longer use tslint so these comments don't do anything.
-
khasty720 authored
## Summary This PR adds a Next.js example using [Reactsrap](https://reactstrap.github.io/)
-
JJ Kasper authored
Closes: https://github.com/vercel/next.js/issues/16088
-
- 11 Aug, 2020 3 commits
-
-
webpack://_N_E/Andrew Nagy authored
In with-sentry add stripPrefix of `webpack://_N_E/`. This removes the `webpack://_N_E/` prefix from the stack trace which will help Sentry to understand what is "App Only" vs "Full" I'll fully tested calling errors in browser and the stack traces are still aligned and linked correctly. This just gets rid of the extra data in the front which seems to be the same for everyone and I believe it comes from webpack 5 (?)
-
Tim Neutkens authored
Co-authored-by:kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Tim Neutkens authored
Fixes #16066
-