mirror of
https://codeberg.org/SafeTwitch/safetwitch.git
synced 2025-01-03 11:20:07 -05:00
Use lazy loading to decrease bundle size
This commit is contained in:
parent
250697448c
commit
68dd4eef64
3 changed files with 7 additions and 8 deletions
|
@ -8,6 +8,7 @@
|
||||||
import videojs from 'video.js'
|
import videojs from 'video.js'
|
||||||
import qualityLevels from 'videojs-contrib-quality-levels'
|
import qualityLevels from 'videojs-contrib-quality-levels'
|
||||||
import { createQualitySelector } from '@/assets/qualitySelector'
|
import { createQualitySelector } from '@/assets/qualitySelector'
|
||||||
|
import 'video.js/dist/video-js.css'
|
||||||
|
|
||||||
videojs.registerPlugin('qualityLevels', qualityLevels)
|
videojs.registerPlugin('qualityLevels', qualityLevels)
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
|
|
||||||
import './assets/index.css'
|
import './assets/index.css'
|
||||||
|
|
||||||
import 'video.js/dist/video-js.css'
|
|
||||||
|
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
|
|
||||||
import { OhVueIcon, addIcons } from 'oh-vue-icons'
|
import { OhVueIcon, addIcons } from 'oh-vue-icons'
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import { createRouter, createWebHistory } from 'vue-router'
|
import { createRouter, createWebHistory } from 'vue-router'
|
||||||
import UserView from '../views/UserView.vue'
|
const UserView = () => import('../views/UserView.vue')
|
||||||
import PageNotFound from '../views/PageNotFound.vue'
|
const PageNotFound = () => import('../views/PageNotFound.vue')
|
||||||
import PrivacyPageView from '../views/PrivacyPageView.vue'
|
const PrivacyPageView = () => import('../views/PrivacyPageView.vue')
|
||||||
import HomepageView from '../views/HomepageView.vue'
|
const HomepageView = () => import('../views/HomepageView.vue')
|
||||||
import CategoryView from '../views/CategoryView.vue'
|
const CategoryView = () => import('../views/CategoryView.vue')
|
||||||
|
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(import.meta.env.BASE_URL),
|
history: createWebHistory(import.meta.env.BASE_URL),
|
||||||
|
|
Loading…
Reference in a new issue