docs: fix advice on adding default export (#1179)

This commit is contained in:
Daniel Roe 2021-10-18 16:07:17 +01:00 committed by GitHub
parent 8607d0ae4c
commit a6071393b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,7 +106,7 @@ Avoid the usage of `__dirname` and `__filename` as much as possible.
### Ensure plugins default export
If you inject a Nuxt plugin that does not have `export default` (such as global Vue plugins), ensure you add `export default {}` to the end of it.
If you inject a Nuxt plugin that does not have `export default` (such as global Vue plugins), ensure you add `export default () => { }` to the end of it.
::code-group
```js [Before]