feat(compiler): element codegen
This commit is contained in:
@@ -8,7 +8,7 @@ function compileToFunction(
|
||||
options?: CompilerOptions
|
||||
): RenderFunction {
|
||||
const { code } = compile(template, options)
|
||||
return new Function(`with(this){return ${code}}`) as RenderFunction
|
||||
return new Function(code)() as RenderFunction
|
||||
}
|
||||
|
||||
registerRuntimeCompiler(compileToFunction)
|
||||
|
||||
Reference in New Issue
Block a user