i18n-extract
i18n-extract copied to clipboard
Does not seem to play nice with .vue files.
Hi all,
I've been using polyglot
with Vue as a Vue mixin, and tried using this tool to analyze .vue
components as well as plain .js
modules. It works wonderfully if I am only using it on the JavaScript files, but adding a Vue component to the mix results in the following error:
throw jsxError || err;
^
SyntaxError: Unexpected token (3:46)
at Parser.pp$5.raise (/Users/seanohue/node_modules/babylon/lib/index.js:4454:13)
at Parser.pp.unexpected
Note that I am not using JSX with Vue. It seems to be attempting to parse the Vue files as though they are JSX, and fails when running into... something unexpected. Note that it also does not tell me where in the files it was trying to parse that it failed on, so I am not sure which token it found issue with.
@seanohue Do you have a reproduction example? I have never tried the plugin with Vue, nor I have much interest in supporting it. Any idea how we could solve the issue?