Skip to content

Commit cea3bcf

Browse files
authored
feat(server): invalidate module with hmr (#10333)
1 parent 4363a06 commit cea3bcf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

guide/api-javascript.md

+5
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ interface ViteDevServer {
119119
* Fix ssr error stacktrace.
120120
*/
121121
ssrFixStacktrace(e: Error): void
122+
/**
123+
* Triggers HMR for a module in the module graph. You can use the `server.moduleGraph`
124+
* API to retrieve the module to be reloaded. If `hmr` is false, this is a no-op.
125+
*/
126+
reloadModule(module: ModuleNode): Promise<void>
122127
/**
123128
* Start the server.
124129
*/

0 commit comments

Comments
 (0)