Home / Function/ assertOutputHashContentChange() — vite Function Reference

assertOutputHashContentChange() — vite Function Reference

Architecture documentation for the assertOutputHashContentChange() function in build.spec.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  777c764d_c39b_309b_b63d_dc01e5f193c9["assertOutputHashContentChange()"]
  3e7daccf_2fe4_9035_51ba_1725f7c874bd["build.spec.ts"]
  777c764d_c39b_309b_b63d_dc01e5f193c9 -->|defined in| 3e7daccf_2fe4_9035_51ba_1725f7c874bd
  style 777c764d_c39b_309b_b63d_dc01e5f193c9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/__tests__/build.spec.ts lines 1167–1184

function assertOutputHashContentChange(
  output1: RolldownOutput,
  output2: RolldownOutput,
) {
  for (const chunk of output1.output) {
    if (chunk.type === 'chunk') {
      const chunk2 = output2.output.find(
        (c) => c.type === 'chunk' && c.fileName === chunk.fileName,
      ) as OutputChunk | undefined
      if (chunk2) {
        expect(
          chunk.code,
          `the ${chunk.fileName} chunk has the same hash but different contents between builds`,
        ).toEqual(chunk2.code)
      }
    }
  }
}

Domain

Subdomains

Frequently Asked Questions

What does assertOutputHashContentChange() do?
assertOutputHashContentChange() is a function in the vite codebase, defined in packages/vite/src/node/__tests__/build.spec.ts.
Where is assertOutputHashContentChange() defined?
assertOutputHashContentChange() is defined in packages/vite/src/node/__tests__/build.spec.ts at line 1167.

Analyze Your Own Codebase

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

Try Supermodel Free