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

Lazy loading does not work with translations in single file components #3263

Open
PaulCombal opened this issue Dec 12, 2024 · 0 comments
Open

Comments

@PaulCombal
Copy link

Environment

Reproduction

Using single file component translations like so:

<script setup lang="ts">
const { t } = useI18n()
</script>

<template>
  <p>{{ t('hello') }}</p>
</template>

<i18n lang="json">
{
  "en": {
    "hello": "hello world!"
  },
  "ja": {
    "hello": "こんにちは、世界!"
  }
}
</i18n>

Lazy loading does not work: it seems to lazy load the translation files just fine but not the SFC translations.

Is this intended?

Describe the bug

I expected the language/translation chunks from SFCs to be downloaded on language switch, however only the language files seem to be downloaded.

Additional context

No response

Logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant