-
Notifications
You must be signed in to change notification settings - Fork 26.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backport metadata fixes #62663
Backport metadata fixes #62663
Conversation
#61898) * Narrow down the metadata base warnings only when there's any relative urls need to be resolved, if there's only absolute urls present, no need to resolve and we don't warn. * Polish the error message, updated from "metadata.metadataBase is not set ..." to "metadataBase property in metadata export is not set ..." It will be confusing if we're still show metadataBase warning when there's no need to set one, since the social image cards only have absolute urls Closes NEXT-2426
We should respect the `trailingSlash` config for metadata canonical url, this PR is adding the handling for strip or keep the trailing slash for canonical url. Passing down trailingSlash config to metadata resolving to decide how we handle it. The tricky one was `/` pathname, when visiting the origin directly, that it will always have at least `/` in the URL instance. But for the default `origin`, it shouldn't show the `/` if the `trailingSlash` config is `false`. Also it should show trailing slash for all pathnames if that config is enabled. BTW there's a `__NEXT_TRAILING_SLASH` env but since we're using the fixed nextjs runtime module, so this can't be dynamically replaced in the metadata resolving modules. So we didn't use it Fixes #54070 Closes NEXT-2424
### What Change from processing the file with `next-metatdata-route-loader` directly into passing the file as loader query, and leave an empty resource file for it. This will resolve the error that users were seeing with `manifest.json` convention. ``` Import trace for requested module: ../../../../packages/next/dist/build/webpack/loaders/next-metadata-route-loader.js?page=%2Fmanifest.jso n%2Froute&isDynamic=0!./app/manifest.json?__next_metadata_route__ getStaticAssetRouteCode page /manifest.json/route this.resourcePath /Users/huozhi/workspace/next.js/tes t/e2e/app-dir/metadata-json-manifest/app/manifest.json ``` ### Why I looked at the loader process that the final resource processed by webpack is `json!next-metadata-route-loader...`, which means the builtin json loader processing json file after the metadata route loader. I didn't get chance to solve the ordering issue, so I changed the resourcePath to empty "", and pass the file path as query into the loader to avoid json-loader processing it after transpilation. Fixes #59923 Closes NEXT-2630 Closes NEXT-2439
Stats from current PRDefault Build (Increase detected
|
vercel/next.js canary | vercel/next.js metadata-fix | Change | |
---|---|---|---|
buildDuration | 12.9s | 12.9s | N/A |
buildDurationCached | 7.8s | 6.2s | N/A |
nodeModulesSize | 197 MB | 200 MB | |
nextStartRea..uration (ms) | 406ms | 409ms | N/A |
Client Bundles (main, webpack)
vercel/next.js canary | vercel/next.js metadata-fix | Change | |
---|---|---|---|
304.HASH.js gzip | 181 B | 182 B | N/A |
3f784ff6-HASH.js gzip | 53.6 kB | 53.4 kB | N/A |
453-HASH.js gzip | 30.5 kB | 29.1 kB | N/A |
framework-HASH.js gzip | 45.2 kB | 45.2 kB | ✓ |
main-app-HASH.js gzip | 239 B | 242 B | N/A |
main-HASH.js gzip | 32 kB | 31.8 kB | N/A |
webpack-HASH.js gzip | 1.7 kB | 1.7 kB | N/A |
Overall change | 45.2 kB | 45.2 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js metadata-fix | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31 kB | 31 kB | N/A |
Overall change | 0 B | 0 B | ✓ |
Client Pages
vercel/next.js canary | vercel/next.js metadata-fix | Change | |
---|---|---|---|
_app-HASH.js gzip | 195 B | 195 B | ✓ |
_error-HASH.js gzip | 182 B | 181 B | N/A |
amp-HASH.js gzip | 503 B | 502 B | N/A |
css-HASH.js gzip | 322 B | 321 B | N/A |
dynamic-HASH.js gzip | 2.5 kB | 2.5 kB | ✓ |
edge-ssr-HASH.js gzip | 255 B | 253 B | N/A |
head-HASH.js gzip | 350 B | 349 B | N/A |
hooks-HASH.js gzip | 368 B | 369 B | N/A |
image-HASH.js gzip | 4.2 kB | 4.18 kB | N/A |
index-HASH.js gzip | 256 B | 256 B | ✓ |
link-HASH.js gzip | 2.67 kB | 2.61 kB | N/A |
routerDirect..HASH.js gzip | 312 B | 311 B | N/A |
script-HASH.js gzip | 384 B | 383 B | N/A |
withRouter-HASH.js gzip | 307 B | 308 B | N/A |
1afbb74e6ecf..834.css gzip | 106 B | 106 B | ✓ |
Overall change | 3.06 kB | 3.06 kB | ✓ |
Client Build Manifests
vercel/next.js canary | vercel/next.js metadata-fix | Change | |
---|---|---|---|
_buildManifest.js gzip | 482 B | 485 B | N/A |
Overall change | 0 B | 0 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | vercel/next.js metadata-fix | Change | |
---|---|---|---|
index.html gzip | 528 B | 526 B | N/A |
link.html gzip | 540 B | 539 B | N/A |
withRouter.html gzip | 524 B | 522 B | N/A |
Overall change | 0 B | 0 B | ✓ |
Edge SSR bundle Size
vercel/next.js canary | vercel/next.js metadata-fix | Change | |
---|---|---|---|
edge-ssr.js gzip | 95.1 kB | 93.9 kB | N/A |
page.js gzip | 127 kB | 124 kB | N/A |
Overall change | 0 B | 0 B | ✓ |
Middleware size Overall increase ⚠️
vercel/next.js canary | vercel/next.js metadata-fix | Change | |
---|---|---|---|
middleware-b..fest.js gzip | 624 B | 627 B | N/A |
middleware-r..fest.js gzip | 151 B | 151 B | ✓ |
middleware.js gzip | 25.4 kB | 47.1 kB | |
edge-runtime..pack.js gzip | 839 B | 1.94 kB | |
Overall change | 26.4 kB | 49.2 kB |
Next Runtimes Overall increase ⚠️
vercel/next.js canary | vercel/next.js metadata-fix | Change | |
---|---|---|---|
app-page-exp...dev.js gzip | 171 kB | 170 kB | N/A |
app-page-exp..prod.js gzip | 96.7 kB | 95.7 kB | N/A |
app-page-tur..prod.js gzip | 98.5 kB | 96.4 kB | N/A |
app-page-tur..prod.js gzip | 92.9 kB | 91 kB | N/A |
app-page.run...dev.js gzip | 150 kB | 142 kB | N/A |
app-page.run..prod.js gzip | 91.4 kB | 90.3 kB | N/A |
app-route-ex...dev.js gzip | 21.3 kB | 24.2 kB | |
app-route-ex..prod.js gzip | 15 kB | 16.8 kB | |
app-route-tu..prod.js gzip | 15 kB | 16.8 kB | |
app-route-tu..prod.js gzip | 14.8 kB | 16.4 kB | |
app-route.ru...dev.js gzip | 20.9 kB | 23.6 kB | |
app-route.ru..prod.js gzip | 14.8 kB | 16.4 kB | |
pages-api-tu..prod.js gzip | 9.51 kB | 9.39 kB | N/A |
pages-api.ru...dev.js gzip | 9.79 kB | 9.67 kB | N/A |
pages-api.ru..prod.js gzip | 9.51 kB | 9.39 kB | N/A |
pages-turbo...prod.js gzip | 22.3 kB | 22 kB | N/A |
pages.runtim...dev.js gzip | 23 kB | 22.6 kB | N/A |
pages.runtim..prod.js gzip | 22.3 kB | 22 kB | N/A |
server.runti..prod.js gzip | 50.6 kB | 49.6 kB | N/A |
Overall change | 102 kB | 114 kB |
Diff details
Diff for page.js
Diff too large to display
Diff for middleware.js
Diff too large to display
Diff for edge-ssr.js
Diff too large to display
Diff for dynamic-HASH.js
@@ -1,7 +1,7 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[739],
{
- /***/ 8484: /***/ function (
+ /***/ 9816: /***/ function (
__unused_webpack_module,
__unused_webpack_exports,
__webpack_require__
@@ -9,7 +9,7 @@
(window.__NEXT_P = window.__NEXT_P || []).push([
"/dynamic",
function () {
- return __webpack_require__(4281);
+ return __webpack_require__(6222);
},
]);
if (false) {
@@ -18,7 +18,7 @@
/***/
},
- /***/ 3228: /***/ function (module, exports, __webpack_require__) {
+ /***/ 3943: /***/ function (module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -36,22 +36,17 @@
noSSR: function () {
return noSSR;
},
- /**
- * This function lets you dynamically import a component.
- * It uses [React.lazy()](https://react.dev/reference/react/lazy) with [Suspense](https://react.dev/reference/react/Suspense) under the hood.
- *
- * Read more: [Next.js Docs: `next/dynamic`](https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading#nextdynamic)
- */ default: function () {
+ default: function () {
return dynamic;
},
});
- const _interop_require_default = __webpack_require__(2430);
+ const _interop_require_default = __webpack_require__(1351);
const _jsxruntime = __webpack_require__(1527);
const _react = /*#__PURE__*/ _interop_require_default._(
__webpack_require__(959)
);
const _loadablesharedruntime = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(1091)
+ __webpack_require__(3191)
);
const isServerSide = "object" === "undefined";
// Normalize loader to return the module as form { default: Component } for `React.lazy`.
@@ -152,7 +147,7 @@
/***/
},
- /***/ 2281: /***/ function (
+ /***/ 4363: /***/ function (
__unused_webpack_module,
exports,
__webpack_require__
@@ -168,7 +163,7 @@
return LoadableContext;
},
});
- const _interop_require_default = __webpack_require__(2430);
+ const _interop_require_default = __webpack_require__(1351);
const _react = /*#__PURE__*/ _interop_require_default._(
__webpack_require__(959)
);
@@ -179,7 +174,7 @@
/***/
},
- /***/ 1091: /***/ function (
+ /***/ 3191: /***/ function (
__unused_webpack_module,
exports,
__webpack_require__
@@ -217,11 +212,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
return _default;
},
});
- const _interop_require_default = __webpack_require__(2430);
+ const _interop_require_default = __webpack_require__(1351);
const _react = /*#__PURE__*/ _interop_require_default._(
__webpack_require__(959)
);
- const _loadablecontextsharedruntime = __webpack_require__(2281);
+ const _loadablecontextsharedruntime = __webpack_require__(4363);
function resolve(obj) {
return obj && obj.default ? obj.default : obj;
}
@@ -456,7 +451,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
/***/
},
- /***/ 4281: /***/ function (
+ /***/ 6222: /***/ function (
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
@@ -472,7 +467,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
__webpack_require__(1527);
/* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_1__ =
- __webpack_require__(5620);
+ __webpack_require__(4438);
/* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_1___default =
/*#__PURE__*/ __webpack_require__.n(
next_dynamic__WEBPACK_IMPORTED_MODULE_1__
@@ -481,11 +476,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
const DynamicHello = next_dynamic__WEBPACK_IMPORTED_MODULE_1___default()(
() =>
__webpack_require__
- .e(/* import() */ 304)
- .then(__webpack_require__.bind(__webpack_require__, 3304)),
+ .e(/* import() */ 18)
+ .then(__webpack_require__.bind(__webpack_require__, 6018)),
{
loadableGenerated: {
- webpack: () => [/*require.resolve*/ 3304],
+ webpack: () => [/*require.resolve*/ 6018],
},
}
);
@@ -512,12 +507,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
/***/
},
- /***/ 5620: /***/ function (
+ /***/ 4438: /***/ function (
module,
__unused_webpack_exports,
__webpack_require__
) {
- module.exports = __webpack_require__(3228);
+ module.exports = __webpack_require__(3943);
/***/
},
@@ -528,7 +523,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
return __webpack_require__((__webpack_require__.s = moduleId));
};
/******/ __webpack_require__.O(0, [888, 774, 179], function () {
- return __webpack_exec__(8484);
+ return __webpack_exec__(9816);
});
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ _N_E = __webpack_exports__;
Diff for image-HASH.js
@@ -1,7 +1,7 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[358],
{
- /***/ 1552: /***/ function (
+ /***/ 4070: /***/ function (
__unused_webpack_module,
__unused_webpack_exports,
__webpack_require__
@@ -9,7 +9,7 @@
(window.__NEXT_P = window.__NEXT_P || []).push([
"/image",
function () {
- return __webpack_require__(5237);
+ return __webpack_require__(3697);
},
]);
if (false) {
@@ -18,7 +18,7 @@
/***/
},
- /***/ 2016: /***/ function (module, exports, __webpack_require__) {
+ /***/ 2353: /***/ function (module, exports, __webpack_require__) {
"use strict";
/* __next_internal_client_entry_do_not_use__ cjs */
Object.defineProperty(exports, "__esModule", {
@@ -30,8 +30,8 @@
return Image;
},
});
- const _interop_require_default = __webpack_require__(2430);
- const _interop_require_wildcard = __webpack_require__(1778);
+ const _interop_require_default = __webpack_require__(1351);
+ const _interop_require_wildcard = __webpack_require__(5815);
const _jsxruntime = __webpack_require__(1527);
const _react = /*#__PURE__*/ _interop_require_wildcard._(
__webpack_require__(959)
@@ -40,15 +40,15 @@
__webpack_require__(422)
);
const _head = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(6074)
+ __webpack_require__(2272)
);
- const _getimgprops = __webpack_require__(9571);
- const _imageconfig = __webpack_require__(6567);
- const _imageconfigcontextsharedruntime = __webpack_require__(419);
- const _warnonce = __webpack_require__(4486);
- const _routercontextsharedruntime = __webpack_require__(162);
+ const _getimgprops = __webpack_require__(2530);
+ const _imageconfig = __webpack_require__(4899);
+ const _imageconfigcontextsharedruntime = __webpack_require__(9292);
+ const _warnonce = __webpack_require__(4213);
+ const _routercontextsharedruntime = __webpack_require__(7084);
const _imageloader = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(6996)
+ __webpack_require__(7443)
);
// This is replaced by webpack define plugin
const configEnv = {
@@ -69,8 +69,7 @@
onLoadRef,
onLoadingCompleteRef,
setBlurComplete,
- unoptimized,
- sizesInput
+ unoptimized
) {
const src = img == null ? void 0 : img.src;
if (!img || img["data-loaded-src"] === src) {
@@ -166,7 +165,6 @@
onLoadingCompleteRef,
setBlurComplete,
setShowAltText,
- sizesInput,
onLoad,
onError,
...rest
@@ -221,8 +219,7 @@
onLoadRef,
onLoadingCompleteRef,
setBlurComplete,
- unoptimized,
- sizesInput
+ unoptimized
);
}
},
@@ -234,7 +231,6 @@
setBlurComplete,
onError,
unoptimized,
- sizesInput,
forwardedRef,
]
),
@@ -246,8 +242,7 @@
onLoadRef,
onLoadingCompleteRef,
setBlurComplete,
- unoptimized,
- sizesInput
+ unoptimized
);
},
onError: (event) => {
@@ -351,7 +346,6 @@
onLoadingCompleteRef: onLoadingCompleteRef,
setBlurComplete: setBlurComplete,
setShowAltText: setShowAltText,
- sizesInput: props.sizes,
ref: forwardedRef,
}),
imgMeta.priority
@@ -379,7 +373,7 @@
/***/
},
- /***/ 9571: /***/ function (
+ /***/ 2530: /***/ function (
__unused_webpack_module,
exports,
__webpack_require__
@@ -395,9 +389,9 @@
return getImgProps;
},
});
- const _warnonce = __webpack_require__(4486);
- const _imageblursvg = __webpack_require__(133);
- const _imageconfig = __webpack_require__(6567);
+ const _warnonce = __webpack_require__(4213);
+ const _imageblursvg = __webpack_require__(3139);
+ const _imageconfig = __webpack_require__(4899);
const VALID_LOADING_VALUES =
/* unused pure expression or super */ null && [
"lazy",
@@ -766,7 +760,7 @@
/***/
},
- /***/ 133: /***/ function (__unused_webpack_module, exports) {
+ /***/ 3139: /***/ function (__unused_webpack_module, exports) {
"use strict";
/**
* A shared function, used on both client and server, to generate a SVG blur placeholder.
@@ -821,7 +815,7 @@
/***/
},
- /***/ 4085: /***/ function (
+ /***/ 3067: /***/ function (
__unused_webpack_module,
exports,
__webpack_require__
@@ -847,13 +841,13 @@
return _default;
},
});
- const _interop_require_default = __webpack_require__(2430);
- const _getimgprops = __webpack_require__(9571);
- const _imagecomponent = __webpack_require__(2016);
+ const _interop_require_default = __webpack_require__(1351);
+ const _getimgprops = __webpack_require__(2530);
+ const _imagecomponent = __webpack_require__(2353);
const _imageloader = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(6996)
+ __webpack_require__(7443)
);
- function getImageProps(imgProps) {
+ const getImageProps = (imgProps) => {
const { props } = (0, _getimgprops.getImgProps)(imgProps, {
defaultLoader: _imageloader.default,
// This is replaced by webpack define plugin
@@ -877,13 +871,13 @@
return {
props,
};
- }
+ };
const _default = _imagecomponent.Image; //# sourceMappingURL=image-external.js.map
/***/
},
- /***/ 6996: /***/ function (__unused_webpack_module, exports) {
+ /***/ 7443: /***/ function (__unused_webpack_module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -918,7 +912,7 @@
/***/
},
- /***/ 5237: /***/ function (
+ /***/ 3697: /***/ function (
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
@@ -939,8 +933,8 @@
// EXTERNAL MODULE: ./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(1527);
- // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/image.js
- var next_image = __webpack_require__(1577);
+ // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/image.js
+ var next_image = __webpack_require__(73);
var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // CONCATENATED MODULE: ./pages/nextjs.png
/* harmony default export */ var nextjs = {
src: "/_next/static/media/nextjs.cae0b805.png",
@@ -970,12 +964,12 @@
/***/
},
- /***/ 1577: /***/ function (
+ /***/ 73: /***/ function (
module,
__unused_webpack_exports,
__webpack_require__
) {
- module.exports = __webpack_require__(4085);
+ module.exports = __webpack_require__(3067);
/***/
},
@@ -986,7 +980,7 @@
return __webpack_require__((__webpack_require__.s = moduleId));
};
/******/ __webpack_require__.O(0, [888, 774, 179], function () {
- return __webpack_exec__(1552);
+ return __webpack_exec__(4070);
});
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ _N_E = __webpack_exports__;
Diff for link-HASH.js
@@ -1,7 +1,7 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[644],
{
- /***/ 1794: /***/ function (
+ /***/ 8959: /***/ function (
__unused_webpack_module,
__unused_webpack_exports,
__webpack_require__
@@ -9,7 +9,7 @@
(window.__NEXT_P = window.__NEXT_P || []).push([
"/link",
function () {
- return __webpack_require__(2378);
+ return __webpack_require__(3071);
},
]);
if (false) {
@@ -18,7 +18,7 @@
/***/
},
- /***/ 5435: /***/ function (module, exports) {
+ /***/ 6589: /***/ function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -36,9 +36,6 @@
PrefetchKind: function () {
return PrefetchKind;
},
- PrefetchCacheEntryStatus: function () {
- return PrefetchCacheEntryStatus;
- },
ACTION_REFRESH: function () {
return ACTION_REFRESH;
},
@@ -77,13 +74,6 @@
PrefetchKind["FULL"] = "full";
PrefetchKind["TEMPORARY"] = "temporary";
})(PrefetchKind || (PrefetchKind = {}));
- var PrefetchCacheEntryStatus;
- (function (PrefetchCacheEntryStatus) {
- PrefetchCacheEntryStatus["fresh"] = "fresh";
- PrefetchCacheEntryStatus["reusable"] = "reusable";
- PrefetchCacheEntryStatus["expired"] = "expired";
- PrefetchCacheEntryStatus["stale"] = "stale";
- })(PrefetchCacheEntryStatus || (PrefetchCacheEntryStatus = {}));
function isThenable(value) {
// TODO: We don't gain anything from this abstraction. It's unsound, and only
// makes sense in the specific places where we use it. So it's better to keep
@@ -110,7 +100,7 @@
/***/
},
- /***/ 742: /***/ function (module, exports, __webpack_require__) {
+ /***/ 8428: /***/ function (module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -122,7 +112,7 @@
return getDomainLocale;
},
});
- const _normalizetrailingslash = __webpack_require__(9515);
+ const _normalizetrailingslash = __webpack_require__(6465);
const basePath =
/* unused pure expression or super */ null && (false || "");
function getDomainLocale(path, locale, locales, domainLocales) {
@@ -146,7 +136,7 @@
/***/
},
- /***/ 7569: /***/ function (module, exports, __webpack_require__) {
+ /***/ 1706: /***/ function (module, exports, __webpack_require__) {
"use strict";
/* __next_internal_client_entry_do_not_use__ cjs */
Object.defineProperty(exports, "__esModule", {
@@ -158,22 +148,22 @@
return _default;
},
});
- const _interop_require_default = __webpack_require__(2430);
+ const _interop_require_default = __webpack_require__(1351);
const _jsxruntime = __webpack_require__(1527);
const _react = /*#__PURE__*/ _interop_require_default._(
__webpack_require__(959)
);
- const _resolvehref = __webpack_require__(3433);
- const _islocalurl = __webpack_require__(5594);
- const _formaturl = __webpack_require__(1357);
- const _utils = __webpack_require__(1784);
- const _addlocale = __webpack_require__(866);
- const _routercontextsharedruntime = __webpack_require__(162);
- const _approutercontextsharedruntime = __webpack_require__(853);
- const _useintersection = __webpack_require__(1462);
- const _getdomainlocale = __webpack_require__(742);
- const _addbasepath = __webpack_require__(9110);
- const _routerreducertypes = __webpack_require__(5435);
+ const _resolvehref = __webpack_require__(1221);
+ const _islocalurl = __webpack_require__(244);
+ const _formaturl = __webpack_require__(6076);
+ const _utils = __webpack_require__(266);
+ const _addlocale = __webpack_require__(8057);
+ const _routercontextsharedruntime = __webpack_require__(7084);
+ const _approutercontextsharedruntime = __webpack_require__(5171);
+ const _useintersection = __webpack_require__(9058);
+ const _getdomainlocale = __webpack_require__(8428);
+ const _addbasepath = __webpack_require__(8261);
+ const _routerreducertypes = __webpack_require__(6589);
const prefetched = new Set();
function prefetch(router, href, as, options, appOptions, isAppRouter) {
if (false) {
@@ -274,12 +264,7 @@
return (0, _formaturl.formatUrl)(urlObjOrString);
}
/**
- * A React component that extends the HTML `<a>` element to provide [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)
- * and client-side navigation between routes.
- *
- * It is the primary way to navigate between routes in Next.js.
- *
- * Read more: [Next.js docs: `<Link>`](https://nextjs.org/docs/app/api-reference/components/link)
+ * React Component that enables client-side transitions between routes.
*/ const Link = /*#__PURE__*/ _react.default.forwardRef(
function LinkComponent(props, forwardedRef) {
let children;
@@ -494,44 +479,39 @@
isAppRouter
);
},
- onTouchStart: false
- ? 0
- : function onTouchStart(e) {
- if (
- !legacyBehavior &&
- typeof onTouchStartProp === "function"
- ) {
- onTouchStartProp(e);
- }
- if (
- legacyBehavior &&
- child.props &&
- typeof child.props.onTouchStart === "function"
- ) {
- child.props.onTouchStart(e);
- }
- if (!router) {
- return;
- }
- if (!prefetchEnabled && isAppRouter) {
- return;
- }
- prefetch(
- router,
- href,
- as,
- {
- locale,
- priority: true,
- // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
- bypassPrefetchedCheck: true,
- },
- {
- kind: appPrefetchKind,
- },
- isAppRouter
- );
+ onTouchStart(e) {
+ if (!legacyBehavior && typeof onTouchStartProp === "function") {
+ onTouchStartProp(e);
+ }
+ if (
+ legacyBehavior &&
+ child.props &&
+ typeof child.props.onTouchStart === "function"
+ ) {
+ child.props.onTouchStart(e);
+ }
+ if (!router) {
+ return;
+ }
+ if (!prefetchEnabled && isAppRouter) {
+ return;
+ }
+ prefetch(
+ router,
+ href,
+ as,
+ {
+ locale,
+ priority: true,
+ // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
+ bypassPrefetchedCheck: true,
},
+ {
+ kind: appPrefetchKind,
+ },
+ isAppRouter
+ );
+ },
};
// If child is an <a> tag and doesn't have a href attribute, or if the 'passHref' property is
// defined, we specify the current 'href', so that repetition is not needed by the user.
@@ -594,7 +574,7 @@
/***/
},
- /***/ 1462: /***/ function (module, exports, __webpack_require__) {
+ /***/ 9058: /***/ function (module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -607,7 +587,7 @@
},
});
const _react = __webpack_require__(959);
- const _requestidlecallback = __webpack_require__(3921);
+ const _requestidlecallback = __webpack_require__(9265);
const hasIntersectionObserver =
typeof IntersectionObserver === "function";
const observers = new Map();
@@ -720,7 +700,7 @@
/***/
},
- /***/ 2378: /***/ function (
+ /***/ 3071: /***/ function (
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
@@ -736,7 +716,7 @@
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
__webpack_require__(1527);
/* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ =
- __webpack_require__(3639);
+ __webpack_require__(2075);
/* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default =
/*#__PURE__*/ __webpack_require__.n(
next_link__WEBPACK_IMPORTED_MODULE_1__
@@ -767,12 +747,12 @@
/***/
},
- /***/ 3639: /***/ function (
+ /***/ 2075: /***/ function (
module,
__unused_webpack_exports,
__webpack_require__
) {
- module.exports = __webpack_require__(7569);
+ module.exports = __webpack_require__(1706);
/***/
},
@@ -783,7 +763,7 @@
return __webpack_require__((__webpack_require__.s = moduleId));
};
/******/ __webpack_require__.O(0, [888, 774, 179], function () {
- return __webpack_exec__(1794);
+ return __webpack_exec__(8959);
});
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ _N_E = __webpack_exports__;
Diff for 3f784ff6-HASH.js
Diff too large to display
Diff for 453-HASH.js
Diff too large to display
Diff for main-HASH.js
Diff too large to display
Diff for polyfills-HASH.js
Diff too large to display
Diff for webpack-HASH.js
@@ -219,7 +219,7 @@
/******/ __webpack_require__.u = function (chunkId) {
/******/ // return url for filenames based on template
/******/ return (
- "static/chunks/" + chunkId + "." + "19c15f3988446f13" + ".js"
+ "static/chunks/" + chunkId + "." + "d0d10dabd8ac2b9e" + ".js"
);
/******/
};
@@ -282,7 +282,6 @@
/******/
}
/******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
- /******/
/******/ script.src = __webpack_require__.tu(url);
/******/
}
Diff for app-page-exp..ntime.dev.js
failed to diff
Diff for app-page-exp..time.prod.js
Diff too large to display
Diff for app-page-tur..time.prod.js
Diff too large to display
Diff for app-page-tur..time.prod.js
Diff too large to display
Diff for app-page.runtime.dev.js
failed to diff
Diff for app-page.runtime.prod.js
Diff too large to display
Diff for app-route-ex..ntime.dev.js
Diff too large to display
Diff for app-route-ex..time.prod.js
Diff too large to display
Diff for app-route-tu..time.prod.js
Diff too large to display
Diff for app-route-tu..time.prod.js
Diff too large to display
Diff for app-route.runtime.dev.js
Diff too large to display
Diff for app-route.ru..time.prod.js
Diff too large to display
Diff for pages-api-tu..time.prod.js
Diff too large to display
Diff for pages-api.runtime.dev.js
Diff too large to display
Diff for pages-api.ru..time.prod.js
Diff too large to display
Diff for pages-turbo...time.prod.js
Diff too large to display
Diff for pages.runtime.dev.js
Diff too large to display
Diff for pages.runtime.prod.js
Diff too large to display
Diff for server.runtime.prod.js
Diff too large to display
Backport metadata fixes
#61898
#62109
#62615
Closes NEXT-2641