Skip to content

Commit 7760ccd

Browse files
authored
fix: improve vue-i18n configuration not found warning (#3398)
1 parent 7bc6927 commit 7760ccd

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/layers.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,11 @@ export async function resolveLayerVueI18nConfigInfo(options: NuxtI18nOptions) {
167167

168168
const resolveArr = nuxt.options._layers.map(async layer => {
169169
const i18n = getLayerI18n(layer)
170-
const res = await resolveVueI18nConfigInfo(resolveI18nDir(layer, i18n || {}, true), i18n?.vueI18n)
170+
const i18nDirPath = resolveI18nDir(layer, i18n || {}, true)
171+
const res = await resolveVueI18nConfigInfo(i18nDirPath, i18n?.vueI18n)
171172

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

0 commit comments

Comments
 (0)