Currently, I'm working on incorporating a local font into my NextJS + TailwindCSS project. The font has been placed inside the public/fonts directory and I am closely following the provided documentation.
Here is a snippet of my code:
import localFont from '@next/font/local'
const inter = Inter({
subsets: ['latin'],
})
const recoleta = localFont({
src: 'fonts/Recoleta-Regular.ttf',
fontFamily: 'Recoleta',
})
Unfortunately, upon running the code, an error message appears in the terminal indicating:
I would greatly appreciate guidance on where specifically to add the font file or how to perfectly configure it for successful implementation.
Module not found: Can't resolve './fonts/Recoleta-Regular.ttf'