mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2025-11-04 14:41:57 +00:00 
			
		
		
		
	Fix vite from complaining about import analysis.
This commit is contained in:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user