Skip to content

Commit d1ead80

Browse files
committed
fix
1 parent a02fe15 commit d1ead80

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/.vitepress/config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ export default {
55
title: 'Yii3 Documentation',
66
ignoreDeadLinks: true,
77
head: [['link', {rel: 'icon', href: '/docs/favicon.svg', type: 'image/svg+xml'}]],
8+
vite: {
9+
build: {
10+
chunkSizeWarningLimit: 1000
11+
}
12+
},
813
themeConfig: {
914
logo: '/images/yii_logo.svg',
1015
lastUpdated: true,

src/.vitepress/theme/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { h, nextTick, watch, onMounted } from "vue";
22
import DefaultTheme from 'vitepress/theme-without-fonts'
33
import { useData, useRoute } from "vitepress";
44
import { createMermaidRenderer } from "vitepress-mermaid-renderer";
5-
import GLightbox from 'glightbox';
65
import 'glightbox/dist/css/glightbox.css';
76
import './style.css'
87

@@ -31,7 +30,9 @@ export default {
3130
const route = useRoute();
3231
let lightbox = null;
3332

34-
const initGLightbox = () => {
33+
const initGLightbox = async () => {
34+
const GLightbox = (await import('glightbox')).default;
35+
3536
if (lightbox) {
3637
lightbox.destroy();
3738
}

0 commit comments

Comments
 (0)