@harshitpant/next-fonts

Import fonts in [Next.js](https://github.com/zeit/next.js) (woff, woff2, eot, ttf & otf)

Usage no npm install needed!

<script type="module">
  import harshitpantNextFonts from 'https://cdn.skypack.dev/@harshitpant/next-fonts';
</script>

README

Next.js + Fonts

Import fonts in Next.js (woff, woff2, eot, ttf & otf)

Installation

npm install --save next-fonts

or

yarn add next-fonts

Usage

Create a next.config.js in your project

// next.config.js
const withFonts = require('next-fonts')
module.exports = withFonts()

Optionally you can add your custom Next.js configuration as parameter

// next.config.js
const withFonts = require('next-fonts')
module.exports = withFonts({
  webpack(config, options) {
    return config
  }
})