Setup

Check the Nuxt documentation for more information about installing and using modules in Nuxt.

Installation

Add @nuxtjs/google-fonts dependency to your project:

yarn add --dev @nuxtjs/google-fonts
npm install --save-dev @nuxtjs/google-fonts

Then, add @nuxtjs/google-fonts to the buildModules section of nuxt.config.js:

nuxt.config.js
{
  buildModules: [
    '@nuxtjs/google-fonts'
  ],
}

If you are using Nuxt < v2.9 you have to install the module as a dependency (No --dev or --save-dev flags) and use modules section in nuxt.config.js instead of buildModules.

Edit this page on GitHub Updated at Mon, Aug 23, 2021