When using @vue/compiler-core to parse the .vue file, an error is reported "Illegal tag name. Use'<' to print'<'."
Version
3.0.7
Reproduction link
https://codesandbox.io/s/vuecompiler-core-problem-fp4zl?file=/src/main.js
Steps to reproduce
- write a .vue file,must includes 「<」in script tag
- use 「@vue/compiler-core」's 「baseParse」parsing file content string
What is expected?
get correct result
What is actually happening?
report an error 「Illegal tag name. Use'<' to print'<'.」
@yyx990803 I am not sure is it because my usage is wrong,but without 「<」 it works Maybe need to convert again before baseParse?
you should be using @vue/compiler-sfc
to compile Single File Components. Is there a specific reason you want to use the core compiler?