Skip to content

Commit 70c4773

Browse files
committed
fix: error
Signed-off-by: nullptr-t-oss <127822226+0x-br0k3n@users.noreply.github.com>
1 parent ca1d86b commit 70c4773

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/.vitepress/config.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,15 @@ export default defineConfigWithTheme<ThemeConfig>({
1313
rollupOptions: {
1414
output: {
1515
manualChunks(id) {
16-
// Split heavy dependencies into their own chunks
17-
if (id.includes('shiki')) return 'shiki';
18-
if (id.includes('vue')) return 'vue-core';
19-
if (id.includes('vitepress-theme-mild')) return 'theme';
16+
17+
if (id.includes('shiki') || id.includes('@shikijs')) {
18+
return 'shiki';
19+
}
20+
21+
if (id.includes('node_modules/vue')) {
22+
return 'vue';
23+
}
24+
2025
}
2126
}
2227
}

src/.vitepress/config.ts.bak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default defineConfigWithTheme<ThemeConfig>({
1414
output: {
1515
manualChunks(id) {
1616
// Split heavy dependencies into their own chunks
17-
if (id.includes('shiki')) return 'shiki'; // Syntax highlighter is huge
17+
if (id.includes('shiki')) return 'shiki';
1818
if (id.includes('vue')) return 'vue-core';
1919
if (id.includes('vitepress-theme-mild')) return 'theme';
2020
}

0 commit comments

Comments
 (0)