From 4a34c2a75be5f7bbe4c48451456fcaab274ddd67 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Oct 2021 13:11:21 +0100 Subject: [PATCH] fix(bridge): add vuex alias (#1026) --- packages/bridge/src/app.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/bridge/src/app.ts b/packages/bridge/src/app.ts index 1761031cd8..41204ce047 100644 --- a/packages/bridge/src/app.ts +++ b/packages/bridge/src/app.ts @@ -9,6 +9,9 @@ export function setupAppBridge (_options: any) { nuxt.options.alias['#app'] = resolve(distDir, 'runtime/index.mjs') nuxt.options.alias['#build'] = nuxt.options.buildDir + // Alias vuex to its esm version, as vuex.mjs currently exports cjs: https://github.com/vuejs/vuex/pull/2073 + nuxt.options.alias.vuex = 'vuex/dist/vuex.esm.js' + // Alias vue to a vue3-compat version of vue2 nuxt.options.alias['#vue'] = nuxt.options.alias.vue || resolveModule('vue/dist/vue.runtime.esm.js', { paths: nuxt.options.modulesDir }) for (const alias of [