Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update setup content #124

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 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,20 @@ 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`:
danielroe marked this conversation as resolved.
Show resolved Hide resolved

```js[nuxt.config.ts]
{
modules: [
'@nuxtjs/google-fonts'
],
}
danielroe marked this conversation as resolved.
Show resolved Hide resolved
```

<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>