diff --git a/specs/fixtures/vue_i18n_options/vue-i18n.options.ts b/specs/fixtures/vue_i18n_options/config/vue-i18n.options.ts similarity index 100% rename from specs/fixtures/vue_i18n_options/vue-i18n.options.ts rename to specs/fixtures/vue_i18n_options/config/vue-i18n.options.ts diff --git a/specs/vue_i18n_custom_options.spec.ts b/specs/vue_i18n_custom_options.spec.ts index f5d639f5a..3c92114ac 100644 --- a/specs/vue_i18n_custom_options.spec.ts +++ b/specs/vue_i18n_custom_options.spec.ts @@ -9,7 +9,7 @@ await setup({ // overrides nuxtConfig: { i18n: { - vueI18n: './vue-i18n.options.ts' + vueI18n: './config/vue-i18n.options.ts' } } }) diff --git a/src/utils.ts b/src/utils.ts index 34692a016..ba14f3e42 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -250,7 +250,7 @@ export async function resolveVueI18nConfigInfo(options: NuxtI18nOptions, buildDi const absolutePath = await resolvePath(configPathInfo.relative, { cwd: rootDir, extensions: EXECUTABLE_EXTENSIONS }) if (await isExists(absolutePath)) { const parsed = parsePath(absolutePath) - const loadPath = join(configPathInfo.relativeBase, parsed.base) + const loadPath = join(configPathInfo.relativeBase, relative(rootDir, absolutePath)) configPathInfo.absolute = absolutePath configPathInfo.type = getLocaleType(absolutePath)