Skip to content

Commit

Permalink
docs: update setup content (#124)
Browse files Browse the repository at this point in the history
* docs: update setup content

* style: remove extra line breaks

* docs: add `defineNuxtConfig` wrapper

---------

Co-authored-by: Daniel Roe <daniel@roe.dev>
  • Loading branch information
damisparks and danielroe authored Mar 21, 2023
1 parent 1c88ecd commit d0cbd91
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/content/en/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Add `@nuxtjs/google-fonts` dependency to your project:
</code-block>
</code-group>

### For Nuxt 2

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

```js[nuxt.config.js]
Expand All @@ -43,3 +45,21 @@ Then, add `@nuxtjs/google-fonts` to the `buildModules` section of `nuxt.config.j
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.

</alert>

### For Nuxt 3

Then, add `@nuxtjs/google-fonts` to the `modules` section of `nuxt.config.ts`:

```js[nuxt.config.ts]
export default defineNuxtConfig({
modules: [
'@nuxtjs/google-fonts'
],
})
```

<alert type="warning">

Nuxt modules are now build-time-only, and the `buildModules` property used in Nuxt 2 is deprecated in favor of `modules`.

</alert>

0 comments on commit d0cbd91

Please sign in to comment.