Home / Function/ normalizeHmrUrl() — vite Function Reference

normalizeHmrUrl() — vite Function Reference

Architecture documentation for the normalizeHmrUrl() function in hmr.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  c53e5bad_93f7_fd4d_b80d_b4177c517b80["normalizeHmrUrl()"]
  18db4f26_79f1_5b7d_b291_4feeaf95538f["hmr.ts"]
  c53e5bad_93f7_fd4d_b80d_b4177c517b80 -->|defined in| 18db4f26_79f1_5b7d_b291_4feeaf95538f
  a1fc1de5_905b_efe7_d960_3597604fbdfe["importAnalysisPlugin()"]
  a1fc1de5_905b_efe7_d960_3597604fbdfe -->|calls| c53e5bad_93f7_fd4d_b80d_b4177c517b80
  f64686c5_88e2_949b_57b5_197f77dea3a7["updateModules()"]
  f64686c5_88e2_949b_57b5_197f77dea3a7 -->|calls| c53e5bad_93f7_fd4d_b80d_b4177c517b80
  0c17692e_44e4_448d_4a57_1d0018af1182["wrapId()"]
  c53e5bad_93f7_fd4d_b80d_b4177c517b80 -->|calls| 0c17692e_44e4_448d_4a57_1d0018af1182
  style c53e5bad_93f7_fd4d_b80d_b4177c517b80 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/server/hmr.ts lines 1074–1079

export function normalizeHmrUrl(url: string): string {
  if (url[0] !== '.' && url[0] !== '/') {
    url = wrapId(url)
  }
  return url
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does normalizeHmrUrl() do?
normalizeHmrUrl() is a function in the vite codebase, defined in packages/vite/src/node/server/hmr.ts.
Where is normalizeHmrUrl() defined?
normalizeHmrUrl() is defined in packages/vite/src/node/server/hmr.ts at line 1074.
What does normalizeHmrUrl() call?
normalizeHmrUrl() calls 1 function(s): wrapId.
What calls normalizeHmrUrl()?
normalizeHmrUrl() is called by 2 function(s): importAnalysisPlugin, updateModules.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free