Skip to content

Commit

Permalink
Unrelated
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Apr 3, 2024
1 parent a14c002 commit 468084d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion packages/next-swc/crates/next-api/src/pages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ impl PageEndpoint {
.read()
.await?,
FileContent::NotFound
) || true;
);

let next_font_manifest_output = create_font_manifest(
this.pages_project.project().client_root(),
Expand Down
16 changes: 0 additions & 16 deletions packages/next/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,6 @@ function getNextFontLinkTags(
preload: null,
}
}
console.log(
'nextFontManifest',
nextFontManifest,
'dangerousAsPath',
dangerousAsPath,
'assetPrefix',
assetPrefix
)

const appFontsEntry = nextFontManifest.pages['/_app']
const pageFontsEntry = nextFontManifest.pages[dangerousAsPath]
Expand All @@ -383,14 +375,6 @@ function getNextFontLinkTags(
new Set([...(appFontsEntry ?? []), ...(pageFontsEntry ?? [])])
)

console.log(
'preloadedFontFiles',
preloadedFontFiles,
'appFontsEntry',
appFontsEntry,
'pageFontsEntry',
pageFontsEntry
)
// If no font files should preload but there's an entry for the path, add a preconnect tag.
const preconnectToSelf = !!(
preloadedFontFiles.length === 0 &&
Expand Down
3 changes: 0 additions & 3 deletions test/e2e/next-font/without-preloaded-fonts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,8 @@ describe('next/font/google no preloads with _app', () => {

test('without fonts', async () => {
const html = await renderViaHTTP(next.url, '/without-fonts')
console.log('html', html)
const $ = cheerio.load(html)

// <link data-next-font="size-adjust" rel="preconnect" href="/" crossorigin="anonymous"/>

// Preconnect
expect($('link[rel="preconnect"]').length).toBe(1)
expect($('link[rel="preconnect"]').get(0).attribs).toEqual({
Expand Down

0 comments on commit 468084d

Please sign in to comment.