Skip to content

Commit

Permalink
fix: resolve vuePath in all cases
Browse files Browse the repository at this point in the history
fix #270
  • Loading branch information
yyx990803 committed May 26, 2020
1 parent 610a004 commit e67b698
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/node/utils/resolveVue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit e67b698

Please sign in to comment.