Skip to content

Commit

Permalink
fix: improve vue-i18n configuration not found warning (#3398)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbieGoede authored Mar 9, 2025
1 parent 7bc6927 commit 7760ccd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/layers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,11 @@ export async function resolveLayerVueI18nConfigInfo(options: NuxtI18nOptions) {

const resolveArr = nuxt.options._layers.map(async layer => {
const i18n = getLayerI18n(layer)
const res = await resolveVueI18nConfigInfo(resolveI18nDir(layer, i18n || {}, true), i18n?.vueI18n)
const i18nDirPath = resolveI18nDir(layer, i18n || {}, true)
const res = await resolveVueI18nConfigInfo(i18nDirPath, i18n?.vueI18n)

if (res == null && i18n?.vueI18n != null) {
logger.warn(
`Ignore Vue I18n configuration file does not exist at ${i18n.vueI18n} in ${layer.config.rootDir}. Skipping...`
)
logger.warn(`Vue I18n configuration file \`${i18n.vueI18n}\` not found in \`${i18nDirPath}\`. Skipping...`)
return undefined
}

Expand Down

0 comments on commit 7760ccd

Please sign in to comment.