Skip to content

Commit 0ea62d2

Browse files
rorry121luolei
and
luolei
authored
feat: resolve complier from peer dep when unable to resolve from the root (#68)
Co-authored-by: luolei <[email protected]>
1 parent b8e6133 commit 0ea62d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/compiler.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type * as _compiler from 'vue/compiler-sfc'
1010

1111
export function resolveCompiler(root: string): typeof _compiler {
1212
// resolve from project root first, then fallback to peer dep (if any)
13-
const compiler = tryRequire('vue/compiler-sfc', root)
13+
const compiler = tryRequire('vue/compiler-sfc', root) || tryRequire('vue/compiler-sfc')
1414

1515
if (!compiler) {
1616
throw new Error(

0 commit comments

Comments
 (0)