Reduce size of client js bundles (#15264)

* add packages

* Only include the needed parts of BootstrapVue

* remove yargs from client

* treeshake validator library

* formatting

* fix import
This commit is contained in:
Phillip Thelen
2024-08-06 19:53:44 +02:00
committed by GitHub
parent 6b02af69f2
commit 1be169a105
14 changed files with 884 additions and 25 deletions

View File

@@ -1,6 +1,15 @@
import Vue from 'vue';
import axios from 'axios';
import BootstrapVue from 'bootstrap-vue';
import {
ModalPlugin,
DropdownPlugin,
PopoverPlugin,
FormPlugin,
FormInputPlugin,
TooltipPlugin,
NavbarPlugin,
CollapsePlugin,
} from 'bootstrap-vue';
import Fragment from 'vue-fragment';
import AppComponent from './app';
import {
@@ -29,7 +38,14 @@ Vue.config.productionTip = IS_PRODUCTION;
// window['habitica-i18n] is injected by the server
Vue.use(i18n, { i18nData: window && window['habitica-i18n'] });
Vue.use(StoreModule);
Vue.use(BootstrapVue);
Vue.use(ModalPlugin);
Vue.use(DropdownPlugin);
Vue.use(PopoverPlugin);
Vue.use(FormPlugin);
Vue.use(FormInputPlugin);
Vue.use(TooltipPlugin);
Vue.use(NavbarPlugin);
Vue.use(CollapsePlugin);
Vue.use(Fragment.Plugin);
setUpLogging();