I'm trying to use a local font with 'next/font/local'. My page.js looks like this:
import Image from 'next/image'
import localFont from 'next/font/local'
const myFont = localFont({src: '../public/neue-gaas-grotesk-rg.woff'})
export default function Home() {
return (
<main className={myFont.className}>
Hello World!
</main>
)
}
This works and compiles fine when I use webpack, but with the turbopack I receive the error:
Turbopack failed to compile
Error during SSR Rendering
error - [rendering] [root of the server]/ Error during SSR Rendering
TypeError: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$font$2f$local$2f$index$2e$js__$28$ecmascript$29__.default is not a function
How can I fix this?