Skip to content

Commit

Permalink
docs(readme): add link to Nuxt 3 plugin repository
Browse files Browse the repository at this point in the history
Closes #52
  • Loading branch information
freddy38510 committed Nov 19, 2022
1 parent e94072e commit e975c9a
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions README.md
Expand Up @@ -40,17 +40,7 @@ app.component('LazyHydrate', LazyHydrationWrapper);

#### Global import for Nuxt 3

Create a [Nuxt 3 plugin](https://v3.nuxtjs.org/guide/directory-structure/plugins/) inside the `plugins` directory. The filename doesn't matter as Nuxt [auto-imports](https://v3.nuxtjs.org/guide/directory-structure/plugins/#which-files-are-registered) all top-level files of this directory.

```js
// plugins/lazy-hydration.ts
import { LazyHydrationWrapper } from 'vue3-lazy-hydration';

export default defineNuxtPlugin((nuxtApp) => {
// for custom registered name see Vue example above
nuxtApp.vueApp.component('LazyHydrationWrapper', LazyHydrationWrapper);
});
```
Thanks to [Baroshem](https://github.com/Baroshem) the Nuxt 3 plugin [nuxt-lazy-hydrate](https://github.com/Baroshem/nuxt-lazy-hydrate) is available for this purpose.

## Usage

Expand Down

0 comments on commit e975c9a

Please sign in to comment.