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 5ec01cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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
2 changes: 1 addition & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function createConfig(buildName, output, plugins = []) {
process.exit(1)
}

output.sourcemap = !!process.env.SOURCE_MAP
output.sourcemap = true
output.banner = banner
output.externalLiveBindings = false
output.globals = {
Expand Down

0 comments on commit 5ec01cf

Please sign in to comment.