From e89c1b42fcafa8fd1d4f4b6b04db0ecbc70361fe Mon Sep 17 00:00:00 2001 From: luolei Date: Fri, 28 Oct 2022 11:59:57 +0800 Subject: [PATCH] fix: incorrect compiler address resolution --- src/compile.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/compile.ts b/src/compile.ts index a59689e..18eebf5 100644 --- a/src/compile.ts +++ b/src/compile.ts @@ -20,7 +20,11 @@ function requireCompiler() { if (compileRoot) { try { compiler = _require(_require.resolve('vue/compiler-sfc', { paths: [compileRoot] })) - } catch (e) {} + } catch (e) { + try { + compiler = _require(_require.resolve('@vue/compiler-sfc', { paths: [compileRoot] })) + } catch (e) {} + } } if (!compiler) {