diff --git a/src/core/options.ts b/src/core/options.ts index 9a082e67..028d7d03 100644 --- a/src/core/options.ts +++ b/src/core/options.ts @@ -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