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

wrong I18n locale when using dynamic import #420

Open
5 of 7 tasks
nickydinh88 opened this issue Oct 4, 2024 · 0 comments
Open
5 of 7 tasks

wrong I18n locale when using dynamic import #420

nickydinh88 opened this issue Oct 4, 2024 · 0 comments

Comments

@nickydinh88
Copy link

nickydinh88 commented Oct 4, 2024

Describe the bug

The locale is wrong if I use dynamic import (e.g., in router).

const WizardPage = () => import( /* webpackChunkName: 'page-apply' */ "@/views/WizardPage/WizardPage.vue" );

Then, all the routes have the same locale.

"vite-ssg": "0.23.8",
"vue": "3.5.8",
"vue-i18n": "9.13.1",

Reproduction

Running vite-ssg build

System Info

System:
    OS: macOS 12.5.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 65.67 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
  Browsers:
    Chrome: 129.0.6668.90
    Safari: 15.6.1

Used Package Manager

yarn

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • 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, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Contributions

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant