Skip to content

Commit

Permalink
fix: Incorrect compiler address resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
luolei committed Oct 26, 2022
1 parent 0b491bd commit 7038f1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/compile.ts
Expand Up @@ -12,7 +12,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) {
Expand Down

0 comments on commit 7038f1f

Please sign in to comment.