From e1ebadb4892608b02d370f18296a6bae256acd05 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 10 Nov 2021 18:28:16 +0100 Subject: [PATCH] fix: workaround prod build bug --- packages/nuxt/src/templates/plugin.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/nuxt/src/templates/plugin.ts b/packages/nuxt/src/templates/plugin.ts index f42300ed..df6717d0 100644 --- a/packages/nuxt/src/templates/plugin.ts +++ b/packages/nuxt/src/templates/plugin.ts @@ -5,7 +5,9 @@ import type { Plugin } from '@nuxt/types' const PiniaNuxtPlugin: Plugin = (context, inject) => { if (isVue2) { install() - Vue2.use(PiniaVuePlugin) + // TODO: workaround that should probably be removed in the future + const Vue = 'default' in Vue2 ? Vue2.default : Vue2 + Vue.use(PiniaVuePlugin) } const pinia = createPinia() -- 2.47.3