Skip to content

Commit

Permalink
Fix unnecessary dynamic imports
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Jan 4, 2024
1 parent ade45e4 commit 6101f62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ import { computed } from "vue";
import { useRoute } from "vue-router";
import { useTitle } from "@vueuse/core";
import { api } from "@/api/api";
import * as util from "@/util";
import { useAuth } from "@/auth/auth.composable";
import useLocale from "@/i18n/locale.composable";
import { useCorpusStore } from "@/store/corpus.store";
import MessageToasts from "@/message/MessageToasts.vue";
// Asset path transformation doesn't work in <source srcset> like in <img src>
import usePageTitle from "@/page/title.composable";
import Breadcrumb from "@/page/Breadcrumb.vue";
import AppHeader from "./page/AppHeader.vue";
Expand All @@ -34,6 +35,7 @@ const { title } = usePageTitle();
// Activate automatic updates of the HTML page title.
useTitle(title, { titleTemplate: "%s | Mink" });
const route = useRoute();
const corpusStore = useCorpusStore();
const isHome = computed(() => route.path == "/");
Expand All @@ -42,10 +44,8 @@ refreshJwt();
if (import.meta.env.DEV) {
window.api = api;
import("@/store/corpus.store").then(
(m) => (window.corpusStore = m.useCorpusStore())
);
import("@/util").then((m) => (window.util = m));
window.corpusStore = corpusStore;
window.util = util;
}
</script>
Expand Down
1 change: 1 addition & 0 deletions src/page/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { getLogoutUrl } from "@/auth/auth";
import { useAuth } from "@/auth/auth.composable";
import LocaleSwitcher from "@/i18n/LocaleSwitcher.vue";
import AdminModeBanner from "@/user/AdminModeBanner.vue";
// Asset path transformation doesn't work in <source srcset> like in <img src>
import logoSbxLight from "@/assets/sbx1r-light.svg";
import Spinner from "@/spin/Spinner.vue";
import MinkLogo from "./MinkLogo.vue";
Expand Down

0 comments on commit 6101f62

Please sign in to comment.