rollup-plugin-next-font
v1.0.0-beta.1
Published
Use Next.js's Font API in Rollup environments.
Downloads
25
Readme
next-font rollup plugin
Use Next.js's Font API in Rollup environments.
⚠️
next-font/manifestis current unsupported
Install
npm install next-font rollup-plugin-next-fontUsage
Configuration:
import nextFont from 'rollup-plugin-next-font'
export default {
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. Just note that where it uses next/font imports, you should use next-font imports instead.
