Files
42487f26da fix: preload fonts in template.js (#79417)
Fonts imported in a template module do not preload or preconnect when
used in a template.js file. This PR adds a small fix and a e2e test.

Co-authored-by: Zack Tanner <[email protected]>
2025-05-28 23:54:24 +00:00

16 lines
301 B
JavaScript

import localFont from 'next/font/local'
const layoutFont = localFont({
src: './layout-font-rubik.woff2',
preload: false,
})
export default function Layout({ children }) {
return (
<>
<p className={layoutFont.className}>{JSON.stringify(layoutFont)}</p>
{children}
</>
)
}