-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with tsx template #402
Comments
Thank you for your reporting!
Unfortunately, I could not reproduce the about error in my stackblitz environment 😿 And I have a favor to ask. Two type of your github issues have been reported. |
@kazupon Hi, please try this reproduction, I think this is another similar issue, when using jsx/tsx in setup mode, the error message shows and if you try to reference a variable in node like this: <script lang="tsx" setup>
const foo = 'foo';
const Test = () => <div>Test{foo}</div>;
</script> the error message shows |
I mean regarding the following error.
I recognize about tsx (jsx) issue. |
Oh, I'm sorry, I only attached the working reproduction. (I cannot verify that the error message is still present at the moment, since I have only my iPad on me right now, and it cannot start the dev server on StackBlitz. I have written the component code from memory. I'll be able to check it in about 4 hours.) Btw. could you please help me understand what two types of issues you mean? I thought that this is all related to the same parsing issue. Edit: So, I've checked it and the reproduction above shows the |
Reporting a bug?
After upgrading
@nuxtjs/i18n
from8.5.3
tov9
, I encountered several pre-transform errors. In my main project, it was the following error message:Pre-transform error: '>' expected.
I tracked this down to an issue with parsing TSX templates.While stripping down the project to identify the root cause, I also encountered the following errors:
and
The last one is present in the minimal reproduction linked below.
This issue wasn’t present in
@nuxtjs/[email protected]
.This seems to work fine:
I hope this reproduction is usable, even though it doesn’t directly use
unplugin-vue-i18n
, as it’s minimal enough to demonstrate the issue and doesn't use any@nuxtjs/i18n
features.Expected behavior
Tsx templates to work.
Reproduction
https://stackblitz.com/edit/github-ffpcjt-qcfsie?file=components%2FTestComponent.vue
Working:
https://stackblitz.com/edit/github-ffpcjt?file=nuxt.config.ts,components%2FTestComponent.vue,app.vue
Issue Package
unplugin-vue-i18n
System Info
Screenshot
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: