This commit is contained in:
tyx1703 2025-05-05 20:41:53 +00:00 committed by GitHub
commit 9c73e4f170
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -92,7 +92,11 @@ function compileToFunction(
// In the global build we know `Vue` is available globally so we can avoid
// the wildcard object.
const render = (
__GLOBAL__ ? new Function(code)() : new Function('Vue', code)(runtimeDom)
__GLOBAL__
// https://github.com/vuejs/vue-next/issues/5196
// @ts-ignore
? new Function('Vue', code)(Vue)
: new Function('Vue', code)(runtimeDom)
) as RenderFunction
// mark the function as runtime compiled