- 18 8月, 2020 13 次提交
-
-
由 Tim Neutkens 提交于
Don't use this yet as it's still being developed. This is a first iteration that enables the webpack cache. There's still more to do here, for example if css modules are used there's currently a bug where webpack does not save the cache for browser compilation (impacting build performance). @sokra is going to look into that issue.
-
由 Louis Juliendo 提交于
Just correcting a simple typo `fash` to `fast`
-
由 James Mosier 提交于
Co-authored-by: NJoe Haddad <joe.haddad@zeit.co>
-
由 Rounak Agarwal 提交于
Co-authored-by: NJoe Haddad <joe.haddad@zeit.co>
-
由 Joe Haddad 提交于
-
由 Vishnu Sankar 提交于
Co-authored-by: NLuis Alvarez <luis@vercel.com>
-
由 Joe Haddad 提交于
-
由 JJ Kasper 提交于
This fixes an error that was occurring in ie11 due to `forEach` being called on `querySelectorAll` before it was massaged to an array. x-ref: https://github.com/vercel/next.js/pull/16126 Fixes #16283
-
由 Joe Haddad 提交于
-
由 Joe Haddad 提交于
This pull request adds a test case for the reproduction provided in #12445. This bug is specifically caused when loading the next page before navigation has actually occurred. --- Fixes #12445
-
由 JJ Kasper 提交于
-
由 Kristoffer K 提交于
-
由 Kevin Mårtensson 提交于
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.
-
- 17 8月, 2020 4 次提交
-
-
由 JJ Kasper 提交于
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 提交于
-
由 Tim Neutkens 提交于
-
由 Sergey Rubanov 提交于
Co-authored-by: NTim Neutkens <timneutkens@me.com> Co-authored-by: Nkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
- 16 8月, 2020 3 次提交
-
-
由 cargallo 提交于
Added a section in readme with the proper use of the plugin with next-compose-plugins ^2.0.0, otherwise it doesn't work
-
由 Tuan Nguyen 提交于
Just noticed a couple of tiny grammar errors.
-
由 Rafael Almeida 提交于
* Update with-storybook example * Delete with-storybook-typescript example * Add TypeScript section to the README Co-authored-by: Nkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
- 15 8月, 2020 3 次提交
-
-
由 Joe Haddad 提交于
-
由 JJ Kasper 提交于
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 提交于
* Add MSW usage example * Updated example * Added .gitignore * Added .gitignore in the right place lol Co-authored-by: NLuis Alvarez <luis@vercel.com>
-
- 14 8月, 2020 9 次提交
-
-
由 Joe Haddad 提交于
Instead of reading the `BuildManifest` and passing it to `/_document`, it should be able to read it for itself. --- Fixes #16182
-
由 Kristoffer K 提交于
**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 提交于
-
由 Joe Haddad 提交于
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 提交于
-
由 Joe Haddad 提交于
-
由 Joe Haddad 提交于
-
由 Joe Haddad 提交于
-
由 Joe Haddad 提交于
Fixes #16166
-
- 13 8月, 2020 8 次提交
-
-
由 Joe Haddad 提交于
Really basic one! Needed for `next/client`.
-
由 Joe Haddad 提交于
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 提交于
-
由 JJ Kasper 提交于
Co-authored-by: NTim Neutkens <timneutkens@me.com>
-
由 Joe Haddad 提交于
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 提交于
This PR dedupes the `ComponentRes` type to now align with the `loadPage` return type.
-
由 Thorsten Schaeff 提交于
r? @lfades @timothyis cc @kiwicopple @awalias Adding a realtime chat example showing how to implement authentication and realtime data syncing with supabase.io :)
-
由 madiknox 提交于
Fixes #14737
-