fix: import.meta.globEager

This commit is contained in:
Gabriel Pastori
2023-12-17 14:15:17 -03:00
parent 1b40fae7d7
commit 4a1b4c63ba
2 changed files with 2 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ import { createI18n, useI18n } from 'vue-i18n'
// import all files from src/i18n
const messages = Object.fromEntries(
Object.entries(
import.meta.globEager('../i18n/*.js')
import.meta.glob('../i18n/*.js', { eager: true })
).map(([key, value]) => {
const locale = key.match(/([A-Za-z0-9-_]+)\./i)[1]
return [locale, value.default]