From d8a884ed0f754523765058a70149cdbaf6942341 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Wed, 26 Feb 2025 15:06:26 +0530 Subject: [PATCH] fix: prevent reload on first server start in fresh installations --- src/node/plugin.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/node/plugin.ts b/src/node/plugin.ts index 35905912..498f4c9f 100644 --- a/src/node/plugin.ts +++ b/src/node/plugin.ts @@ -10,6 +10,7 @@ import { } from 'vite' import { APP_PATH, + DEFAULT_THEME_PATH, DIST_CLIENT_PATH, SITE_DATA_REQUEST_PATH, resolveAliases @@ -156,8 +157,11 @@ export async function createVitePressPlugin( include: [ 'vue', 'vitepress > @vue/devtools-api', - 'vitepress > @vueuse/core' - ], + 'vitepress > @vueuse/core', + siteConfig.themeDir === DEFAULT_THEME_PATH + ? '@theme/index' + : undefined + ].filter((d) => d != null), exclude: ['@docsearch/js', 'vitepress'] }, server: {