diff --git a/packages/nuxt/src/runtime/plugin.vue3.ts b/packages/nuxt/src/runtime/plugin.vue3.ts index 5290c06dc8..6e4d5367ad 100644 --- a/packages/nuxt/src/runtime/plugin.vue3.ts +++ b/packages/nuxt/src/runtime/plugin.vue3.ts @@ -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) { diff --git a/rollup.config.mjs b/rollup.config.mjs index 74019ed061..95fe0ce8a9 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -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 = {