🚸 🐛 Fix HMR issues & change lang without reload

- Fix HMR issues due to circular import of "language" and "i18n"
- Move i18n to seperate file
- Dynamically update language instead of doing a full page reload
This commit is contained in:
2023-06-05 19:11:15 +02:00
parent d1910a7877
commit 7928e4941f
4 changed files with 26 additions and 18 deletions

View File

@ -2,16 +2,7 @@ import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import { registerSW } from "virtual:pwa-register";
import { createI18n } from "vue-i18n";
import { strings } from "./strings";
import { language } from "./store";
const i18n = createI18n({
locale: language.value,
fallbackLocale: "en",
messages: strings,
});
export default i18n;
import i18n from "./i18n";
const app = createApp(App);