Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/vite/src/shared/hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ interface HotCallback {
fn: (modules: Array<ModuleNamespace | undefined>) => void
}

export interface HMRLogger {
error(msg: string | Error): void
debug(...msg: unknown[]): void
}

export interface HMRConnection {
/**
* Checked before sending messages to the client.
Expand Down Expand Up @@ -196,7 +201,7 @@ export class HMRClient {
public messenger: HMRMessenger

constructor(
public logger: Console,
public logger: HMRLogger,
connection: HMRConnection,
// This allows implementing reloading via different methods depending on the environment
private importUpdatedModule: (update: Update) => Promise<ModuleNamespace>,
Expand Down