Skip to content

Commit

Permalink
fix: @pinia/nuxt breaks createTestingPinia
Browse files Browse the repository at this point in the history
close #2555.
  • Loading branch information
OnlyWick committed Feb 13, 2024
1 parent e12f895 commit 235483b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/nuxt/src/runtime/plugin.vue3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import { defineNuxtPlugin, Plugin } from '#app'

const plugin: Plugin<{ pinia: Pinia }> = defineNuxtPlugin((nuxtApp) => {
const pinia = createPinia()
nuxtApp.vueApp.use(pinia)

if (process.env.NODE_ENV !== 'test') {
nuxtApp.vueApp.use(pinia)
}

setActivePinia(pinia)

if (process.server) {
Expand Down

0 comments on commit 235483b

Please sign in to comment.