fix: theme loading optimizations
This commit is contained in:
parent
866cdd59c8
commit
c9e7811c55
@ -168,9 +168,9 @@ Vue.component('unauthorized', () => import(/* webpackChunkName: "unauthorized" *
|
|||||||
Vue.component('v-card-chin', () => import(/* webpackPrefetch: true, webpackChunkName: "ui-extra" */ './components/common/v-card-chin.vue'))
|
Vue.component('v-card-chin', () => import(/* webpackPrefetch: true, webpackChunkName: "ui-extra" */ './components/common/v-card-chin.vue'))
|
||||||
Vue.component('welcome', () => import(/* webpackChunkName: "welcome" */ './components/welcome.vue'))
|
Vue.component('welcome', () => import(/* webpackChunkName: "welcome" */ './components/welcome.vue'))
|
||||||
|
|
||||||
Vue.component('nav-footer', () => import(/* webpackChunkName: "theme-page" */ './themes/' + process.env.CURRENT_THEME + '/components/nav-footer.vue'))
|
Vue.component('nav-footer', () => import(/* webpackChunkName: "theme" */ './themes/' + siteConfig.theme + '/components/nav-footer.vue'))
|
||||||
Vue.component('nav-sidebar', () => import(/* webpackChunkName: "theme-page" */ './themes/' + process.env.CURRENT_THEME + '/components/nav-sidebar.vue'))
|
Vue.component('nav-sidebar', () => import(/* webpackChunkName: "theme" */ './themes/' + siteConfig.theme + '/components/nav-sidebar.vue'))
|
||||||
Vue.component('page', () => import(/* webpackChunkName: "theme-page" */ './themes/' + process.env.CURRENT_THEME + '/components/page.vue'))
|
Vue.component('page', () => import(/* webpackChunkName: "theme" */ './themes/' + siteConfig.theme + '/components/page.vue'))
|
||||||
|
|
||||||
let bootstrap = () => {
|
let bootstrap = () => {
|
||||||
// ====================================
|
// ====================================
|
||||||
@ -210,13 +210,6 @@ let bootstrap = () => {
|
|||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
|
|
||||||
window.boot.notify('vue')
|
window.boot.notify('vue')
|
||||||
|
|
||||||
// ====================================
|
|
||||||
// Load theme-specific code
|
|
||||||
// ====================================
|
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-expressions
|
|
||||||
import(/* webpackChunkName: "theme-page" */ './themes/' + process.env.CURRENT_THEME + '/js/app.js')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.boot.onDOMReady(bootstrap)
|
window.boot.onDOMReady(bootstrap)
|
||||||
|
@ -1,21 +1,24 @@
|
|||||||
require('core-js/stable')
|
require('core-js/stable')
|
||||||
require('regenerator-runtime/runtime')
|
require('regenerator-runtime/runtime')
|
||||||
|
|
||||||
|
/* global siteConfig */
|
||||||
|
/* eslint-disable no-unused-expressions */
|
||||||
|
|
||||||
switch (window.document.documentElement.lang) {
|
switch (window.document.documentElement.lang) {
|
||||||
case 'ar':
|
case 'ar':
|
||||||
case 'fa':
|
case 'fa':
|
||||||
require('./scss/fonts/arabic.scss')
|
import(/* webpackChunkName: "fonts-arabic" */ './scss/fonts/arabic.scss')
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
require('./scss/fonts/default.scss')
|
import(/* webpackChunkName: "fonts-default" */ './scss/fonts/default.scss')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
require('./scss/app.scss')
|
require('./scss/app.scss')
|
||||||
require('./themes/' + process.env.CURRENT_THEME + '/scss/app.scss')
|
import(/* webpackChunkName: "theme" */ './themes/' + siteConfig.theme + '/scss/app.scss')
|
||||||
|
|
||||||
require('@mdi/font/css/materialdesignicons.css')
|
import(/* webpackChunkName: "mdi" */ '@mdi/font/css/materialdesignicons.css')
|
||||||
|
|
||||||
require('./helpers/compatibility.js')
|
require('./helpers/compatibility.js')
|
||||||
require('./client-app.js')
|
require('./client-app.js')
|
||||||
require('./themes/' + process.env.CURRENT_THEME + '/js/app.js')
|
import(/* webpackChunkName: "theme" */ './themes/' + siteConfig.theme + '/js/app.js')
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
require('core-js/stable')
|
require('core-js/stable')
|
||||||
require('regenerator-runtime/runtime')
|
require('regenerator-runtime/runtime')
|
||||||
|
|
||||||
|
/* eslint-disable no-unused-expressions */
|
||||||
|
|
||||||
require('./scss/app.scss')
|
require('./scss/app.scss')
|
||||||
require('@mdi/font/css/materialdesignicons.css')
|
import(/* webpackChunkName: "mdi" */ '@mdi/font/css/materialdesignicons.css')
|
||||||
|
|
||||||
require('./helpers/compatibility.js')
|
require('./helpers/compatibility.js')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user