We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a6eda4 commit 120736fCopy full SHA for 120736f
src/node/plugin.ts
@@ -257,7 +257,7 @@ export async function createVitePressPlugin(
257
)
258
try {
259
clearCache()
260
- await recreateServer!()
+ await recreateServer?.()
261
} catch (err) {
262
console.error(c.red(`failed to restart server. error:\n`), err)
263
}
src/node/server.ts
@@ -5,7 +5,7 @@ import { createVitePressPlugin } from './plugin'
5
export async function createServer(
6
root: string = process.cwd(),
7
serverOptions: ServerOptions = {},
8
- recreateServer: () => Promise<void>
+ recreateServer?: () => Promise<void>
9
) {
10
const config = await resolveConfig(root)
11
0 commit comments