1 parent
711d1c845d
commit
23dc1cd483
22 files changed
+135
-169
No files matched your search
+3
-2
@@ -5,9 +5,10 @@ import { UserModule } from '~/types'
|
||||
// https://vitejs.dev/guide/features.html#glob-import
|
||||
const messages = Object.fromEntries(
|
||||
Object.entries(
|
||||
import.meta.globEager('../../locales/*.json'))
|
||||
import.meta.globEager('../../locales/*.y(a)?ml'))
|
||||
.map(([key, value]) => {
|
||||
return [key.slice(14, -5), value.default]
|
||||
const yaml = key.endsWith('.yaml')
|
||||
return [key.slice(14, yaml ? -5 : -4), value.default]
|
||||
}),
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user