mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
refactor: upgrade to date-fns3
This commit is contained in:
parent
2a7733611d
commit
654d73e761
3 changed files with 3 additions and 7 deletions
|
@ -19,7 +19,7 @@
|
|||
"@vuelidate/core": "^2.0.3",
|
||||
"@vuelidate/validators": "^2.0.4",
|
||||
"bootstrap-vue": "^2.23.1",
|
||||
"date-fns": "^2.29.3",
|
||||
"date-fns": "^3.3.1",
|
||||
"fork-awesome": "^1.2.0",
|
||||
"simple-evaluate": "^1.4.6",
|
||||
"vue": "3.3.4",
|
||||
|
|
|
@ -90,9 +90,7 @@ export async function loadLocaleMessages(locale) {
|
|||
async function loadDateFnsLocale(locale) {
|
||||
const dateFnsLocaleName = supportedLocales[locale].dateFnsLocale || locale
|
||||
dateFnsLocale = (
|
||||
await import(
|
||||
`../../node_modules/date-fns/esm/locale/${dateFnsLocaleName}/index.js`
|
||||
)
|
||||
await import(`../../node_modules/date-fns/locale/${dateFnsLocaleName}.mjs`)
|
||||
).default
|
||||
}
|
||||
|
||||
|
|
|
@ -68,9 +68,7 @@ export default defineConfig(({ command, mode }) => {
|
|||
}
|
||||
// Split date-fns locales
|
||||
if (id.includes('date-fns')) {
|
||||
const match = /.*\/date-fns\/esm\/locale\/([\w-]+)\/.*\.js/.exec(
|
||||
id,
|
||||
)
|
||||
const match = /.*\/date-fns\/locale\/([\w-]+)\/.*\.mjs/.exec(id)
|
||||
if (match) {
|
||||
if (supportedDatefnsLocales.includes(match[1])) {
|
||||
return `locales/${match[1]}/date-fns`
|
||||
|
|
Loading…
Add table
Reference in a new issue