Migrate to Vite from webpack.

This commit is contained in:
FireMasterK
2021-12-28 14:39:20 +00:00
parent 77010ccac4
commit 4bfbb9aa2e
9 changed files with 276 additions and 8025 deletions

View File

@@ -20,7 +20,7 @@
</template>
<script>
import Navigation from "@/components/Navigation";
import Navigation from "@/components/Navigation.vue";
export default {
components: {
Navigation,
@@ -67,7 +67,7 @@ export default {
}
if (window.i18n.global.locale.value !== locale) {
if (!window.i18n.global.availableLocales.includes(locale)) {
const messages = await import("@/locales/" + locale + ".json").then(module => module.default);
const messages = await import(`./locales/${locale}.json`).then(module => module.default);
window.i18n.global.setLocaleMessage(locale, messages);
}
window.i18n.global.locale.value = locale;
@@ -88,7 +88,6 @@ b {
::-webkit-scrollbar {
background-color: #15191a;
color: #c5bcae;
}
::-webkit-scrollbar-thumb {

View File

@@ -68,7 +68,7 @@
</template>
<script>
import SearchSuggestions from "@/components/SearchSuggestions";
import SearchSuggestions from "@/components/SearchSuggestions.vue";
export default {
components: {

View File

@@ -341,10 +341,8 @@ export default {
this.proxyLBRY = this.getPreferenceBoolean("proxyLBRY", false);
if (this.selectedLanguage != "en") {
try {
this.CountryMap = await import("@/utils/CountryMaps/" + this.selectedLanguage + ".json").then(
val => {
this.countryMap = val;
},
this.CountryMap = await import(`../utils/CountryMaps/${this.selectedLanguage}.json`).then(
val => val.default,
);
} catch (e) {
console.error("Countries not translated into " + this.selectedLanguage);

View File

@@ -13,11 +13,7 @@
<div>
<p
style="
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
"
style="display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical"
class="my-2 overflow-hidden flex link"
:title="video.title"
>

View File

@@ -36,7 +36,7 @@ library.add(
// import("uikit/dist/css/uikit-core.css");
import router from "@/router/router";
import router from "@/router/router.js";
import App from "./App.vue";
import DOMPurify from "dompurify";