Skip to content
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

<i18n> Block in Nuxt component leads to vite 500 error #424

Open
4 tasks done
gluebi opened this issue Dec 10, 2024 · 0 comments
Open
4 tasks done

<i18n> Block in Nuxt component leads to vite 500 error #424

gluebi opened this issue Dec 10, 2024 · 0 comments
Labels
Status: Review Needed Request for review comments

Comments

@gluebi
Copy link

gluebi commented Dec 10, 2024

Reporting a bug?

When adding a Block to a component in Nuxt the following error is thrown:

[vite-node]
[plugin:unplugin-vue-i18n:resource]
[VITE_ERROR]
/components/TestComp.vue?vue&type=i18n&index=0&locale=de-DE&lang.json <br><pre>export default function (Component) { const _Component = Component _Component.__i18n = _Component.__i18n || [] _Component.__i18n.push({ "locale": "de-DE", "resource": { "breadcrumb.home": (()=&gt;{const fn=(ctx) =&gt; {const { normalize: _normalize } = ctx;return _normalize(["Startseite"])};fn.source="Startseite";return fn;})() } }) } </pre><br>

Expected behavior

The component is compiled and the translation will be shown.

Reproduction

https://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-hrvq7nhs

Issue Package

unplugin-vue-i18n

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm

Screenshot

No response

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the README
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A open a GitHub Discussion.
@gluebi gluebi added the Status: Review Needed Request for review comments label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Review Needed Request for review comments
Projects
None yet
Development

No branches or pull requests

1 participant