refs #6098 perf: remove import.meta.glob
This commit is contained in:
parent
ac660fadd7
commit
899ccc097a
|
@ -22,11 +22,8 @@ const userLocale = computed({
|
||||||
|
|
||||||
if (value === 'en') value = 'en-GB';
|
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 {
|
try {
|
||||||
const langList = import.meta.glob('../../node_modules/quasar/lang/*.mjs');
|
import(`../../node_modules/quasar/lang/${value}.mjs`).then((lang) => {
|
||||||
langList[`../../node_modules/quasar/lang/${value}.mjs`]().then((lang) => {
|
|
||||||
Quasar.lang.set(lang.default);
|
Quasar.lang.set(lang.default);
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue