Unverified Commit 697ae8af authored by Donny/강동윤's avatar Donny/강동윤 Committed by GitHub

feat(turbopack): Align behavior for `link rel="preconnect"` with webpack mode (#64011)

### What?

Emit `<link data-next-font="size-adjust" rel="preconnect" href="/"
crossorigin="anonymous"/>` in more cases.

### Why?

To align with the default mode

### How?
parent 9a6db570
......@@ -45,6 +45,7 @@ pub(crate) async fn create_font_manifest(
let has_fonts = !font_paths.is_empty();
let using_size_adjust = font_paths.iter().any(|path| path.contains("-s"));
let font_paths = font_paths
.into_iter()
.filter(|path| path.contains(".p."))
......
......@@ -86,6 +86,7 @@ impl NextFontGoogleReplacer {
async fn import_map_result(&self, query: String) -> Result<Vc<ImportMapResult>> {
let request_hash = get_request_hash(&query).await?;
let qstr = qstring::QString::from(query.as_str());
let query_vc = Vc::cell(query);
let font_data = load_font_data(self.project_path);
......
......@@ -349,6 +349,7 @@ export async function handleRouteType({
} else {
manifestLoader.deleteMiddlewareManifest(serverKey)
}
await manifestLoader.loadFontManifest('/_app', 'pages')
await manifestLoader.loadFontManifest(page, 'pages')
await manifestLoader.loadLoadableManifest(page, 'pages')
......
......@@ -6616,9 +6616,10 @@
"passed": [
"next/font/google no preloads with _app without preload",
"next/font/google without-preloaded-fonts without _app without fonts",
"next/font/google without-preloaded-fonts without _app without preload"
"next/font/google without-preloaded-fonts without _app without preload",
"next/font/google no preloads with _app without fonts"
],
"failed": ["next/font/google no preloads with _app without fonts"],
"failed": [],
"pending": [],
"flakey": [],
"runtimeError": false
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment