-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Remove optimizeFonts
(Automatic font optimization) superseded by next/font
#69137
Merged
timneutkens
merged 6 commits into
canary
from
08-21-turbopack_build_ensure_all_font_optimization_tests_run
Aug 21, 2024
Merged
Remove optimizeFonts
(Automatic font optimization) superseded by next/font
#69137
timneutkens
merged 6 commits into
canary
from
08-21-turbopack_build_ensure_all_font_optimization_tests_run
Aug 21, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ijjk
added
created-by: Next.js team
PRs by the Next.js team.
Documentation
Related to Next.js' official documentation.
tests
type: next
labels
Aug 21, 2024
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @timneutkens and the rest of your teammates on Graphite |
Stats from current PRDefault BuildGeneral
Client Bundles (main, webpack)
Legacy Client Bundles (polyfills)
Client Pages
Client Build Manifests
Rendered Page Sizes
Edge SSR bundle Size
Middleware size
Next Runtimes
build cache
Diff detailsDiff for page.jsDiff too large to display Diff for middleware.jsDiff too large to display Diff for edge-ssr.jsDiff too large to display Diff for image-HASH.js@@ -1,7 +1,7 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[8358],
{
- /***/ 6835: /***/ (
+ /***/ 9606: /***/ (
__unused_webpack_module,
__unused_webpack_exports,
__webpack_require__
@@ -9,7 +9,7 @@
(window.__NEXT_P = window.__NEXT_P || []).push([
"/image",
function () {
- return __webpack_require__(1274);
+ return __webpack_require__(9670);
},
]);
if (false) {
@@ -18,7 +18,7 @@
/***/
},
- /***/ 9784: /***/ (module, exports, __webpack_require__) => {
+ /***/ 6307: /***/ (module, exports, __webpack_require__) => {
"use strict";
/* __next_internal_client_entry_do_not_use__ cjs */
Object.defineProperty(exports, "__esModule", {
@@ -40,17 +40,17 @@
__webpack_require__(7864)
);
const _head = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(4888)
+ __webpack_require__(4984)
);
- const _getimgprops = __webpack_require__(7204);
- const _imageconfig = __webpack_require__(5319);
- const _imageconfigcontextsharedruntime = __webpack_require__(3170);
- const _warnonce = __webpack_require__(7920);
- const _routercontextsharedruntime = __webpack_require__(7209);
+ const _getimgprops = __webpack_require__(4855);
+ const _imageconfig = __webpack_require__(4609);
+ const _imageconfigcontextsharedruntime = __webpack_require__(3316);
+ const _warnonce = __webpack_require__(2651);
+ const _routercontextsharedruntime = __webpack_require__(4057);
const _imageloader = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(7443)
+ __webpack_require__(8495)
);
- const _usemergedref = __webpack_require__(2531);
+ const _usemergedref = __webpack_require__(7553);
// This is replaced by webpack define plugin
const configEnv = {
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
@@ -371,7 +371,7 @@
/***/
},
- /***/ 2531: /***/ (module, exports, __webpack_require__) => {
+ /***/ 7553: /***/ (module, exports, __webpack_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -440,7 +440,7 @@
/***/
},
- /***/ 7204: /***/ (
+ /***/ 4855: /***/ (
__unused_webpack_module,
exports,
__webpack_require__
@@ -456,9 +456,9 @@
return getImgProps;
},
});
- const _warnonce = __webpack_require__(7920);
- const _imageblursvg = __webpack_require__(2200);
- const _imageconfig = __webpack_require__(5319);
+ const _warnonce = __webpack_require__(2651);
+ const _imageblursvg = __webpack_require__(5067);
+ const _imageconfig = __webpack_require__(4609);
const VALID_LOADING_VALUES =
/* unused pure expression or super */ null && [
"lazy",
@@ -830,7 +830,7 @@
/***/
},
- /***/ 2200: /***/ (__unused_webpack_module, exports) => {
+ /***/ 5067: /***/ (__unused_webpack_module, exports) => {
"use strict";
/**
* A shared function, used on both client and server, to generate a SVG blur placeholder.
@@ -885,7 +885,7 @@
/***/
},
- /***/ 1356: /***/ (
+ /***/ 3505: /***/ (
__unused_webpack_module,
exports,
__webpack_require__
@@ -912,10 +912,10 @@
},
});
const _interop_require_default = __webpack_require__(4345);
- const _getimgprops = __webpack_require__(7204);
- const _imagecomponent = __webpack_require__(9784);
+ const _getimgprops = __webpack_require__(4855);
+ const _imagecomponent = __webpack_require__(6307);
const _imageloader = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(7443)
+ __webpack_require__(8495)
);
function getImageProps(imgProps) {
const { props } = (0, _getimgprops.getImgProps)(imgProps, {
@@ -947,7 +947,7 @@
/***/
},
- /***/ 7443: /***/ (__unused_webpack_module, exports) => {
+ /***/ 8495: /***/ (__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -982,7 +982,7 @@
/***/
},
- /***/ 1274: /***/ (
+ /***/ 9670: /***/ (
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
@@ -999,8 +999,8 @@
// EXTERNAL MODULE: ./node_modules/.pnpm/react@19.0.0-rc-1eaccd82-20240816/node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(1822);
- // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-1eaccd82-20240816_re_5yc7ktq4kyrrvzaq2fultvg3y4/node_modules/next/image.js
- var next_image = __webpack_require__(7091);
+ // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-1eaccd82-20240816_re_kxzj53dvrxjpf46fi64kfjrpy4/node_modules/next/image.js
+ var next_image = __webpack_require__(142);
var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // CONCATENATED MODULE: ./pages/nextjs.png
/* harmony default export */ const nextjs = {
src: "/_next/static/media/nextjs.cae0b805.png",
@@ -1030,12 +1030,12 @@
/***/
},
- /***/ 7091: /***/ (
+ /***/ 142: /***/ (
module,
__unused_webpack_exports,
__webpack_require__
) => {
- module.exports = __webpack_require__(1356);
+ module.exports = __webpack_require__(3505);
/***/
},
@@ -1045,7 +1045,7 @@
/******/ var __webpack_exec__ = (moduleId) =>
__webpack_require__((__webpack_require__.s = moduleId));
/******/ __webpack_require__.O(0, [2888, 9774, 179], () =>
- __webpack_exec__(6835)
+ __webpack_exec__(9606)
);
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ _N_E = __webpack_exports__; Diff for 9018-HASH.js@@ -1,8 +1,8 @@
"use strict";
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
- [9018],
+ [9149],
{
- /***/ 9018: /***/ (module, exports, __webpack_require__) => {
+ /***/ 9149: /***/ (module, exports, __webpack_require__) => {
/* __next_internal_client_entry_do_not_use__ cjs */
Object.defineProperty(exports, "__esModule", {
value: true,
@@ -13,27 +13,27 @@
return Image;
},
});
- const _interop_require_default = __webpack_require__(9384);
- const _interop_require_wildcard = __webpack_require__(9913);
- const _jsxruntime = __webpack_require__(9113);
+ const _interop_require_default = __webpack_require__(8232);
+ const _interop_require_wildcard = __webpack_require__(5339);
+ const _jsxruntime = __webpack_require__(5335);
const _react = /*#__PURE__*/ _interop_require_wildcard._(
- __webpack_require__(6193)
+ __webpack_require__(9960)
);
const _reactdom = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(2527)
+ __webpack_require__(7851)
);
const _head = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(5723)
+ __webpack_require__(5358)
);
- const _getimgprops = __webpack_require__(7428);
- const _imageconfig = __webpack_require__(4011);
- const _imageconfigcontextsharedruntime = __webpack_require__(7352);
- const _warnonce = __webpack_require__(1970);
- const _routercontextsharedruntime = __webpack_require__(1015);
+ const _getimgprops = __webpack_require__(8934);
+ const _imageconfig = __webpack_require__(4021);
+ const _imageconfigcontextsharedruntime = __webpack_require__(614);
+ const _warnonce = __webpack_require__(6748);
+ const _routercontextsharedruntime = __webpack_require__(1013);
const _imageloader = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(22)
+ __webpack_require__(3003)
);
- const _usemergedref = __webpack_require__(3501);
+ const _usemergedref = __webpack_require__(9648);
// This is replaced by webpack define plugin
const configEnv = {
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
@@ -355,7 +355,7 @@
/***/
},
- /***/ 3501: /***/ (module, exports, __webpack_require__) => {
+ /***/ 9648: /***/ (module, exports, __webpack_require__) => {
Object.defineProperty(exports, "__esModule", {
value: true,
});
@@ -375,7 +375,7 @@
return useMergedRef;
},
});
- const _react = __webpack_require__(6193);
+ const _react = __webpack_require__(9960);
function useMergedRef(refA, refB) {
return (0, _react.useMemo)(() => mergeRefs(refA, refB), [refA, refB]);
}
@@ -422,11 +422,7 @@
/***/
},
- /***/ 4783: /***/ (
- __unused_webpack_module,
- exports,
- __webpack_require__
- ) => {
+ /***/ 31: /***/ (__unused_webpack_module, exports, __webpack_require__) => {
Object.defineProperty(exports, "__esModule", {
value: true,
});
@@ -436,9 +432,9 @@
return AmpStateContext;
},
});
- const _interop_require_default = __webpack_require__(9384);
+ const _interop_require_default = __webpack_require__(8232);
const _react = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(6193)
+ __webpack_require__(9960)
);
const AmpStateContext = _react.default.createContext({});
if (false) {
@@ -447,7 +443,7 @@
/***/
},
- /***/ 4122: /***/ (__unused_webpack_module, exports) => {
+ /***/ 3208: /***/ (__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", {
value: true,
});
@@ -469,7 +465,7 @@
/***/
},
- /***/ 7428: /***/ (
+ /***/ 8934: /***/ (
__unused_webpack_module,
exports,
__webpack_require__
@@ -483,9 +479,9 @@
return getImgProps;
},
});
- const _warnonce = __webpack_require__(1970);
- const _imageblursvg = __webpack_require__(7992);
- const _imageconfig = __webpack_require__(4011);
+ const _warnonce = __webpack_require__(6748);
+ const _imageblursvg = __webpack_require__(9736);
+ const _imageconfig = __webpack_require__(4021);
const VALID_LOADING_VALUES =
/* unused pure expression or super */ null && [
"lazy",
@@ -857,7 +853,8 @@
/***/
},
- /***/ 5723: /***/ (module, exports, __webpack_require__) => {
+ /***/ 5358: /***/ (module, exports, __webpack_require__) => {
+ /* provided dependency */ var process = __webpack_require__(3741);
/* __next_internal_client_entry_do_not_use__ cjs */
Object.defineProperty(exports, "__esModule", {
value: true,
@@ -878,19 +875,19 @@
return defaultHead;
},
});
- const _interop_require_default = __webpack_require__(9384);
- const _interop_require_wildcard = __webpack_require__(9913);
- const _jsxruntime = __webpack_require__(9113);
+ const _interop_require_default = __webpack_require__(8232);
+ const _interop_require_wildcard = __webpack_require__(5339);
+ const _jsxruntime = __webpack_require__(5335);
const _react = /*#__PURE__*/ _interop_require_wildcard._(
- __webpack_require__(6193)
+ __webpack_require__(9960)
);
const _sideeffect = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(2907)
+ __webpack_require__(114)
);
- const _ampcontextsharedruntime = __webpack_require__(4783);
- const _headmanagercontextsharedruntime = __webpack_require__(1854);
- const _ampmode = __webpack_require__(4122);
- const _warnonce = __webpack_require__(1970);
+ const _ampcontextsharedruntime = __webpack_require__(31);
+ const _headmanagercontextsharedruntime = __webpack_require__(866);
+ const _ampmode = __webpack_require__(3208);
+ const _warnonce = __webpack_require__(6748);
function defaultHead(inAmpMode) {
if (inAmpMode === void 0) inAmpMode = false;
const head = [
@@ -1014,7 +1011,7 @@
.reverse()
.map((c, i) => {
const key = c.key || i;
- if (true && !inAmpMode) {
+ if (true && process.env.__NEXT_OPTIMIZE_FONTS && !inAmpMode) {
if (
c.type === "link" &&
c.props["href"] && // TODO(prateekbh@): Replace this with const from `constants` when the tree shaking works.
@@ -1074,7 +1071,7 @@
/***/
},
- /***/ 7992: /***/ (__unused_webpack_module, exports) => {
+ /***/ 9736: /***/ (__unused_webpack_module, exports) => {
/**
* A shared function, used on both client and server, to generate a SVG blur placeholder.
*/
@@ -1128,7 +1125,7 @@
/***/
},
- /***/ 7352: /***/ (
+ /***/ 614: /***/ (
__unused_webpack_module,
exports,
__webpack_require__
@@ -1142,11 +1139,11 @@
return ImageConfigContext;
},
});
- const _interop_require_default = __webpack_require__(9384);
+ const _interop_require_default = __webpack_require__(8232);
const _react = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(6193)
+ __webpack_require__(9960)
);
- const _imageconfig = __webpack_require__(4011);
+ const _imageconfig = __webpack_require__(4021);
const ImageConfigContext = _react.default.createContext(
_imageconfig.imageConfigDefault
);
@@ -1156,7 +1153,7 @@
/***/
},
- /***/ 4011: /***/ (__unused_webpack_module, exports) => {
+ /***/ 4021: /***/ (__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", {
value: true,
});
@@ -1203,7 +1200,7 @@
/***/
},
- /***/ 22: /***/ (__unused_webpack_module, exports) => {
+ /***/ 3003: /***/ (__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", {
value: true,
});
@@ -1236,7 +1233,7 @@
/***/
},
- /***/ 1015: /***/ (
+ /***/ 1013: /***/ (
__unused_webpack_module,
exports,
__webpack_require__
@@ -1250,9 +1247,9 @@
return RouterContext;
},
});
- const _interop_require_default = __webpack_require__(9384);
+ const _interop_require_default = __webpack_require__(8232);
const _react = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(6193)
+ __webpack_require__(9960)
);
const RouterContext = _react.default.createContext(null);
if (false) {
@@ -1261,7 +1258,7 @@
/***/
},
- /***/ 2907: /***/ (
+ /***/ 114: /***/ (
__unused_webpack_module,
exports,
__webpack_require__
@@ -1275,7 +1272,7 @@
return SideEffect;
},
});
- const _react = __webpack_require__(6193);
+ const _react = __webpack_require__(9960);
const isServer = typeof window === "undefined";
const useClientOnlyLayoutEffect = isServer
? () => {} Diff for main-HASH.jsDiff too large to display Diff for pages-turbo...time.prod.jsDiff too large to display Diff for pages.runtime.dev.jsDiff too large to display Diff for pages.runtime.prod.jsDiff too large to display Diff for server.runtime.prod.jsDiff too large to display |
Tests Passed |
timneutkens
changed the title
Turbopack build: Ensure all font optimization tests run
Remove Aug 21, 2024
optimizeFonts
(Automatic font optimization) superseded by next/font
wbinnssmith
approved these changes
Aug 21, 2024
timneutkens
deleted the
08-21-turbopack_build_ensure_all_font_optimization_tests_run
branch
August 21, 2024 19:39
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
created-by: Next.js team
PRs by the Next.js team.
Documentation
Related to Next.js' official documentation.
Font (next/font)
Related to Next.js Font Optimization.
locked
tests
type: next
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
The
optimizeFonts
optimization has been replaced bynext/font
for almost 2 years and was already no longer documented. This PR cleans up the code related to it. It's recommended to usenext/font
as it's better in every way, ensuring you get preloading of the font but also a local fallback and better fallbacks.