From 899ccc097a91926c19d248695f3f30419a4939f9 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 3 Jan 2024 09:18:13 +0100 Subject: [PATCH] refs #6098 perf: remove import.meta.glob --- src/components/UserPanel.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/UserPanel.vue b/src/components/UserPanel.vue index aee12d105..d02aa7c1f 100644 --- a/src/components/UserPanel.vue +++ b/src/components/UserPanel.vue @@ -22,14 +22,11 @@ const userLocale = computed({ if (value === 'en') value = 'en-GB'; - // FIXME: Dynamic imports from absolute paths are not compatible with vite: - // https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations try { - const langList = import.meta.glob('../../node_modules/quasar/lang/*.mjs'); - langList[`../../node_modules/quasar/lang/${value}.mjs`]().then((lang) => { + import(`../../node_modules/quasar/lang/${value}.mjs`).then((lang) => { Quasar.lang.set(lang.default); }); - } catch (error) { + } catch (error) { // } },