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

Function hotUpdate

packages/vite/src/node/__tests__/plugins/hooks.spec.ts:271–286  ·  packages/vite/src/node/__tests__/plugins/hooks.spec.ts::hotUpdate
()

Source from the content-addressed store, hash-verified

269 const server = await createServerWithPlugin({
270 name: class="st">'test',
271 hotUpdate() {
272 if (this.environment.name !== class="st">'client') return
273
274 expect(this).toMatchObject({
275 debug: expect.any(Function),
276 info: expect.any(Function),
277 warn: expect.any(Function),
278 error: expect.any(Function),
279 meta: expect.any(Object),
280 environment: expect.any(Object),
281 })
282 expect(this.meta.rollupVersion).toBeTypeOf(class="st">'string')
283 expect(this.meta.viteVersion).toBeTypeOf(class="st">'string')
284 expect(this.meta.watchMode).toBe(true)
285 resolve()
286 },
287 })
288 server.watcher.emit(
289 class="st">'change',

Callers

nothing calls this directly

Calls 1

resolveFunction · 0.50

Tested by

no test coverage detected