i18n-extract icon indicating copy to clipboard operation
i18n-extract copied to clipboard

Does not seem to play nice with .vue files.

Open seanohue opened this issue 6 years ago • 1 comments

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 avatar Mar 07 '18 15:03 seanohue

@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?

oliviertassinari avatar Mar 07 '18 22:03 oliviertassinari