Skip to content

Commit

Permalink
fix(nuxt): add workaround to preserve type output (#2147)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Apr 18, 2023
1 parent 0a8cf80 commit 65debf9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/nuxt/src/runtime/plugin.vue3.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { createPinia, setActivePinia } from 'pinia'
import { defineNuxtPlugin } from '#app'
import type { Pinia } from 'pinia'
import { defineNuxtPlugin, Plugin } from '#app'

export default defineNuxtPlugin((nuxtApp) => {
const plugin: Plugin<{ pinia: Pinia }> = defineNuxtPlugin((nuxtApp) => {
const pinia = createPinia()
nuxtApp.vueApp.use(pinia)
setActivePinia(pinia)
Expand All @@ -19,3 +20,5 @@ export default defineNuxtPlugin((nuxtApp) => {
},
}
})

export default plugin

0 comments on commit 65debf9

Please sign in to comment.