vue3-ast-decompiler
v1.0.4
Published
Transforms AST from the @vue/compiler-core back into a template
Downloads
2
Readme
vue3-ast-decompiler
This package transforms AST from the @vue/compiler-core
back into a html vue template
Installation
npm i vue3-ast-decompiler
Usage
import decompile from 'vue3-ast-decompiler'
const template = decompile(yourAstRootNode);
Be aware that this package heavily uses the SourceInformation from the AST, so if you transform your AST, you need to make sure that your locations are set correctly, or you maybe get a template where attributes are incorrectly positioned and that will not compile