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

Base vueI18n path on project root directory when set in config #3399

Open
mcfarljw opened this issue Mar 9, 2025 · 0 comments
Open

Base vueI18n path on project root directory when set in config #3399

mcfarljw opened this issue Mar 9, 2025 · 0 comments

Comments

@mcfarljw
Copy link

mcfarljw commented Mar 9, 2025

Environment

Reproduction

Set the nuxt.config.ts file as follows:

future: {
  compatibilityVersion: 4,
},
i18n: {
  vueI18n: './app/i18n.config.ts',
},

Describe the bug

The config cannot be found because it seems to be looking inside of the i18n directory instead of app directory.

[@nuxtjs/i18n 9:13:41 AM]  WARN  Vue I18n configuration file ./app/i18n.config.ts not found in /Users/joshua/project/i18n. Skipping...

Additional context

The fix is to change it from vueI18n: './app/i18n.config.ts' to vueI18n: '../app/i18n.config.ts' since by default it's relative to the i18n directory. I think it would be more intuitive if when the vueI18n setting is set in the config it's relative to the project root rather than default i18n directory.

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

2 participants