rolldown-plugin-next-font
v1.0.0-beta.1
Published
Use Next.js's Font API in Rolldown environments.
Readme
next-font rolldown plugin
Use Next.js's Font API in Rolldown environments.
⚠️
next-font/manifestis current unsupported
Install
npm install next-font rolldown-plugin-next-fontUsage
Configuration:
import { defineConfig } from 'rolldown'
import nextFont from 'rolldown-plugin-next-font'
export default defineConfig({
plugins: [nextFont()],
})Practically:
import { Inter } from 'next-font/google'
const inter = Inter({ subsets: ['latin'] })
export default function Home() {
return <h1 className={inter.className}>Hello World</h1>
}See the Next.js documentation for more details. Note that where it uses next/font imports, next-font imports should be used instead.
