docs: improve content

master
Sébastien Chopin 2020-10-16 16:22:42 +02:00 committed by GitHub
parent 2a0161a7c1
commit bb1014d6af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 11 deletions

View File

@ -17,23 +17,15 @@ These functions don't have to return anything by default.
For registering hooks, you have to create a nuxt plugin: For registering hooks, you have to create a nuxt plugin:
**nuxt.config.js** ```js{}[nuxt.config.js]
export default {
```js
{
modules: [
'@nuxt/http',
],
plugins: [ plugins: [
'~/plugins/http' '~/plugins/http'
] ]
} }
``` ```
**plugins/http.js** ```js{}[plugins/http.js]
```js
import ky from 'ky-universal' import ky from 'ky-universal'
export default function ({ $http }) { export default function ({ $http }) {