diff --git a/packages/vue/src/index.ts b/packages/vue/src/index.ts index 785f3fd4b..6c5b02cf0 100644 --- a/packages/vue/src/index.ts +++ b/packages/vue/src/index.ts @@ -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