Skip to content

Commit

Permalink
fix: dispose mdit instance on manual restart too
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Oct 29, 2024
1 parent 45968cd commit acfe97f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/node/shortcuts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { ViteDevServer } from 'vite'
import c from 'picocolors'
import { clearCache } from './markdownToVue'
import { disposeMdItInstance } from './markdown/markdown'

type CreateDevServer = () => Promise<void>

Expand Down Expand Up @@ -81,6 +82,7 @@ const SHORTCUTS: CLIShortcut[] = [
clear: true,
timestamp: true
})
disposeMdItInstance()
clearCache()
await server.close()
await createDevServer()
Expand Down

0 comments on commit acfe97f

Please sign in to comment.