Skip to content

Commit 565c8bd

Browse files
authored
fix: get wrong vue version in monorepo (#768)
1 parent aa4bc3e commit 565c8bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/options.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ export function resolveOptions(options: Options, root: string): ResolvedOptions
8484
}
8585

8686
function getVueVersion(root: string): 2 | 2.7 | 3 {
87-
const raw = getPackageInfoSync('vue', { paths: [root] })?.version || '3'
87+
// To fixed [mlly] issue: https://github.com/unjs/mlly/issues/158
88+
const raw = getPackageInfoSync('vue', { paths: [join(root, '/')] })?.version || '3'
8889
const version = +(raw.split('.').slice(0, 2).join('.'))
8990
if (version === 2.7)
9091
return 2.7

0 commit comments

Comments
 (0)