Home / Function/ importHtml() — vite Function Reference

importHtml() — vite Function Reference

Architecture documentation for the importHtml() function in entry-server.tsx from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  fafe3128_2f46_16ee_db94_69734c5a6179["importHtml()"]
  8cf622ac_b52d_c87c_da85_18734f590a24["entry-server.tsx"]
  fafe3128_2f46_16ee_db94_69734c5a6179 -->|defined in| 8cf622ac_b52d_c87c_da85_18734f590a24
  e2c2ae5e_871e_3266_035e_87ca55538732["handler()"]
  e2c2ae5e_871e_3266_035e_87ca55538732 -->|calls| fafe3128_2f46_16ee_db94_69734c5a6179
  style fafe3128_2f46_16ee_db94_69734c5a6179 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

playground/environment-react-ssr/src/entry-server.tsx lines 16–24

async function importHtml() {
  if (import.meta.env.DEV) {
    const mod = await import('/index.html?raw')
    return __globalServer.transformIndexHtml('/', mod.default)
  } else {
    const mod = await import('/dist/client/index.html?raw')
    return mod.default
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does importHtml() do?
importHtml() is a function in the vite codebase, defined in playground/environment-react-ssr/src/entry-server.tsx.
Where is importHtml() defined?
importHtml() is defined in playground/environment-react-ssr/src/entry-server.tsx at line 16.
What calls importHtml()?
importHtml() is called by 1 function(s): handler.

Analyze Your Own Codebase

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

Try Supermodel Free