Skip to content

Commit

Permalink
fix: get wrong vue version in monorepo (#768)
Browse files Browse the repository at this point in the history
  • Loading branch information
wkeylin committed Aug 12, 2024
1 parent aa4bc3e commit 565c8bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ export function resolveOptions(options: Options, root: string): ResolvedOptions
}

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

0 comments on commit 565c8bd

Please sign in to comment.