Open genffy opened 5 years ago
As I understand it's actually a feature request instead of a question so I modified your title.
Or we may consider adding it to @vue/component-compiler-utils
.
Any updates here? I also wonder wether the code for stringification exists somewhere in the Vue Universe already…
What problem does this feature solve?
when i use vue-template-compiler parseComponent a vue file, and use @babel/parser @babel/traverse @babel/generator modify some code at vueTemplateComplier AST.script content But can not find a api to auto generate file from vueTemplateComplier AST it to origin file.
What does the proposed API look like?
const fileContent = compiler.generateComponent(, {
pad: 'space'
});
// fileContent is same as *.vue file content