From 99eaec85478f384ddb0ea45a9d9c95c4dce646f5 Mon Sep 17 00:00:00 2001 From: lain Date: Mon, 8 Jun 2020 17:22:07 +0200 Subject: Messages: Load languages asynchronously. Reduces the size of the initial app bundle by about half. --- src/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main.js') diff --git a/src/main.js b/src/main.js index be4213fa..9a201e4f 100644 --- a/src/main.js +++ b/src/main.js @@ -46,11 +46,13 @@ Vue.use(VBodyScrollLock) const i18n = new VueI18n({ // By default, use the browser locale, we will update it if neccessary - locale: currentLocale, + locale: 'en', fallbackLocale: 'en', - messages + messages: messages.default }) +messages.setLanguage(i18n, currentLocale) + const persistedStateOptions = { paths: [ 'config', -- cgit v1.2.3-70-g09d2