intlify / cli

CLI Tooling for i18n development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for `vue-template-compiler` (Vue 2)

kazupon opened this issue · comments

Clear and concise description of the problem

When we run the SFC of Vue 2, the following error is the output:

SyntaxError: <template functional> is no longer supported in Vue 3, since functional components no longer have significant performance difference from stateful ones. Just use a normal <template> instead.differences

Suggested solution

Currently, @intlify/cli using @vue/sfc-compiler. It is for Vue 3.
For Vue 2, you need to use the -source specification to get around it in order to perform annotate and format smoothly.

It would be useful to be able to use it for Vue 2 as well. It may be useful to be able to select the compiler with the -vue-version option.

Alternative

we can use the --source specification

Additional context

No response

Validations