From e67b698a9ba18a99cb64f52df61fae176382f9ff Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 26 May 2020 10:36:20 -0400 Subject: [PATCH] fix: resolve vuePath in all cases fix #270 --- src/node/utils/resolveVue.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/node/utils/resolveVue.ts b/src/node/utils/resolveVue.ts index f975d4725fd654..44304fa23eee20 100644 --- a/src/node/utils/resolveVue.ts +++ b/src/node/utils/resolveVue.ts @@ -42,12 +42,13 @@ export function resolveVue(root: string): ResolvedVuePaths { if (isLocal) { // user has local vue, verify that the same version of @vue/compiler-sfc // is also installed. - // vuePath will be undefined in this case since vue itself will be - // optimized by the deps optimizer and we can just let the resolver locate - // it. try { const userVuePkg = resolveFrom(root, 'vue/package.json') vueVersion = require(userVuePkg).version + vuePath = resolveFrom( + root, + '@vue/runtime-dom/dist/runtime-dom.esm-bundler.js' + ) const compilerPkgPath = resolveFrom( root, '@vue/compiler-sfc/package.json'