Skip to content

Commit d8a884e

Browse files
committed
fix: prevent reload on first server start in fresh installations
1 parent 06ae2bf commit d8a884e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/node/plugin.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
} from 'vite'
1111
import {
1212
APP_PATH,
13+
DEFAULT_THEME_PATH,
1314
DIST_CLIENT_PATH,
1415
SITE_DATA_REQUEST_PATH,
1516
resolveAliases
@@ -156,8 +157,11 @@ export async function createVitePressPlugin(
156157
include: [
157158
'vue',
158159
'vitepress > @vue/devtools-api',
159-
'vitepress > @vueuse/core'
160-
],
160+
'vitepress > @vueuse/core',
161+
siteConfig.themeDir === DEFAULT_THEME_PATH
162+
? '@theme/index'
163+
: undefined
164+
].filter((d) => d != null),
161165
exclude: ['@docsearch/js', 'vitepress']
162166
},
163167
server: {

0 commit comments

Comments
 (0)