Skip to content

Commit

Permalink
docs: add missing step for Nuxt
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed Jan 26, 2023
1 parent 219c7ed commit 9ceacd6
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion docs/faq/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,23 @@ There are a few steps to do:
import('/@vite-plugin-checker-runtime-entry')
</script>
```
3. Import component above in the root component of your Nuxt project to have a global error overlay.
3. Add vite-plugin-checker to `vite.plugins` in `nuxt.config.ts`.

```ts
import { checker } from 'vite-plugin-checker'
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
vite: {
plugins: [
checker({
vueTsc: true,
}),
],
},
})
```

4. Import component above in the root component of your Nuxt project to have a global error overlay.

```vue
<script setup lang="ts">
Expand All @@ -49,6 +65,8 @@ There are a few steps to do:
</template>
```

You are all set in both development and build mode.

#### Enable vite-plugin-checker as a built-in Nuxt functionality

::: warning
Expand Down

0 comments on commit 9ceacd6

Please sign in to comment.