mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-26 23:47:25 +00:00
Fix vite from complaining about import analysis.
This commit is contained in:
parent
b5b238656b
commit
ce48bd55f1
@ -63,9 +63,9 @@ export default {
|
||||
const defaultLang = await App.defaultLangage;
|
||||
const locale = App.getPreferenceString("hl", defaultLang);
|
||||
if (locale !== App.TimeAgoConfig.locale) {
|
||||
const localeTime = await import(
|
||||
"./../node_modules/javascript-time-ago/locale/" + locale + ".json"
|
||||
).then(module => module.default);
|
||||
const localeTime = await import(`../node_modules/javascript-time-ago/locale/${locale}.json`).then(
|
||||
module => module.default,
|
||||
);
|
||||
App.TimeAgo.addLocale(localeTime);
|
||||
App.TimeAgoConfig.locale = locale;
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ const mixin = {
|
||||
const languages = window.navigator.languages;
|
||||
for (let i = 0; i < languages.length; i++) {
|
||||
try {
|
||||
await import("./locales/" + languages[i] + ".json");
|
||||
await import(`./locales/${languages[i]}.json`);
|
||||
return languages[i];
|
||||
} catch {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user