MCPcopy
hub / github.com/vitejs/vite / invalidate

Method invalidate

packages/vite/src/shared/hmr.ts:99–115  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

97 decline(): void {}
98
99 invalidate(message: string): void {
100 const firstInvalidatedBy =
101 this.hmrClient.currentFirstInvalidatedBy ?? this.ownerPath
102 this.hmrClient.notifyListeners('vite:invalidate', {
103 path: this.ownerPath,
104 message,
105 firstInvalidatedBy,
106 })
107 this.send('vite:invalidate', {
108 path: this.ownerPath,
109 message,
110 firstInvalidatedBy,
111 })
112 this.hmrClient.logger.debug(
113 `invalidate ${this.ownerPath}${message ? `: ${message}` : ''}`,
114 )
115 }
116
117 on<T extends string>(
118 event: T,

Callers

nothing calls this directly

Calls 3

sendMethod · 0.95
notifyListenersMethod · 0.80
debugMethod · 0.65

Tested by

no test coverage detected