From b5d1b87a723b71c0d9a3f0d4f884520a3d0dd257 Mon Sep 17 00:00:00 2001 From: Ske Date: Fri, 19 Apr 2019 20:41:18 +0200 Subject: [PATCH] web: reduce bundle size --- web/app/App.vue | 27 +++++++++++++++++++++++++-- web/app/MemberCard.vue | 4 +++- web/app/SystemEditPage.vue | 12 +++++++++++- web/app/SystemPage.vue | 12 ++++++++++-- web/app/index.js | 19 +++++++++---------- web/package.json | 1 - 6 files changed, 58 insertions(+), 17 deletions(-) diff --git a/web/app/App.vue b/web/app/App.vue index 347e15af..d99250ec 100644 --- a/web/app/App.vue +++ b/web/app/App.vue @@ -17,6 +17,14 @@ @@ -55,7 +64,21 @@ $container-max-widths: ( xl: 960px, ) !default; -@import '~bootstrap/scss/bootstrap.scss'; + +@import '~bootstrap/scss/_functions'; +@import '~bootstrap/scss/_variables'; +@import '~bootstrap/scss/_mixins'; + +@import '~bootstrap/scss/_buttons'; +@import '~bootstrap/scss/_code'; +@import '~bootstrap/scss/_forms'; +@import '~bootstrap/scss/_grid'; +@import '~bootstrap/scss/_nav'; +@import '~bootstrap/scss/_navbar'; +@import '~bootstrap/scss/_reboot'; +@import '~bootstrap/scss/_type'; +@import '~bootstrap/scss/_utilities'; + @import '~bootstrap-vue/src/index.scss'; diff --git a/web/app/MemberCard.vue b/web/app/MemberCard.vue index ab9ea364..2e6f7d5c 100644 --- a/web/app/MemberCard.vue +++ b/web/app/MemberCard.vue @@ -26,7 +26,9 @@ diff --git a/web/app/SystemPage.vue b/web/app/SystemPage.vue index 88072d58..7c2964db 100644 --- a/web/app/SystemPage.vue +++ b/web/app/SystemPage.vue @@ -36,9 +36,16 @@ diff --git a/web/app/index.js b/web/app/index.js index b1d43bb3..4d20200f 100644 --- a/web/app/index.js +++ b/web/app/index.js @@ -1,15 +1,14 @@ import Vue from "vue"; -import VueRouter from "vue-router"; -import BootstrapVue from "bootstrap-vue"; -Vue.use(VueRouter); -Vue.use(BootstrapVue); -import App from "./App.vue"; -import HomePage from "./HomePage.vue"; -import SystemPage from "./SystemPage.vue"; -import SystemEditPage from "./SystemEditPage.vue"; -import MemberEditPage from "./MemberEditPage.vue"; -import OAuthRedirectPage from "./OAuthRedirectPage.vue"; +import VueRouter from "vue-router"; +Vue.use(VueRouter); + +const App = () => import("./App.vue"); +const HomePage = () => import("./HomePage.vue"); +const SystemPage = () => import("./SystemPage.vue"); +const SystemEditPage = () => import("./SystemEditPage.vue"); +const MemberEditPage = () => import("./MemberEditPage.vue"); +const OAuthRedirectPage = () => import("./OAuthRedirectPage.vue"); const router = new VueRouter({ mode: "history", diff --git a/web/package.json b/web/package.json index aec9878f..553896cd 100644 --- a/web/package.json +++ b/web/package.json @@ -5,7 +5,6 @@ "eventemitter3": "^3.1.0", "vue": "^2.6.10", "vue-feather-icons": "^4.10.0", - "vue-hot-reload-api": "^2.3.3", "vue-router": "^3.0.2" }, "devDependencies": {