Home / Function/ serializeTags() — vite Function Reference

serializeTags() — vite Function Reference

Architecture documentation for the serializeTags() function in html.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  bb1d8b71_73c3_31ff_7d80_88303fc49280["serializeTags()"]
  f8fe0737_718a_5509_b722_473f207d5906["html.ts"]
  bb1d8b71_73c3_31ff_7d80_88303fc49280 -->|defined in| f8fe0737_718a_5509_b722_473f207d5906
  fb5a3d66_7c54_2dc1_57bd_7bba8ad8fdbf["injectToHead()"]
  fb5a3d66_7c54_2dc1_57bd_7bba8ad8fdbf -->|calls| bb1d8b71_73c3_31ff_7d80_88303fc49280
  24734732_0f40_e935_b5d1_ae08e9d1dca3["injectToBody()"]
  24734732_0f40_e935_b5d1_ae08e9d1dca3 -->|calls| bb1d8b71_73c3_31ff_7d80_88303fc49280
  3df96a2a_db85_aa8f_52e1_204c48938b88["prependInjectFallback()"]
  3df96a2a_db85_aa8f_52e1_204c48938b88 -->|calls| bb1d8b71_73c3_31ff_7d80_88303fc49280
  a15e31f8_dfca_e732_f0ff_80da09431f9a["serializeTag()"]
  a15e31f8_dfca_e732_f0ff_80da09431f9a -->|calls| bb1d8b71_73c3_31ff_7d80_88303fc49280
  a15e31f8_dfca_e732_f0ff_80da09431f9a["serializeTag()"]
  bb1d8b71_73c3_31ff_7d80_88303fc49280 -->|calls| a15e31f8_dfca_e732_f0ff_80da09431f9a
  style bb1d8b71_73c3_31ff_7d80_88303fc49280 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/plugins/html.ts lines 1555–1565

function serializeTags(
  tags: HtmlTagDescriptor['children'],
  indent: string = '',
): string {
  if (typeof tags === 'string') {
    return tags
  } else if (tags && tags.length) {
    return tags.map((tag) => `${indent}${serializeTag(tag, indent)}\n`).join('')
  }
  return ''
}

Domain

Subdomains

Frequently Asked Questions

What does serializeTags() do?
serializeTags() is a function in the vite codebase, defined in packages/vite/src/node/plugins/html.ts.
Where is serializeTags() defined?
serializeTags() is defined in packages/vite/src/node/plugins/html.ts at line 1555.
What does serializeTags() call?
serializeTags() calls 1 function(s): serializeTag.
What calls serializeTags()?
serializeTags() is called by 4 function(s): injectToBody, injectToHead, prependInjectFallback, serializeTag.

Analyze Your Own Codebase

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

Try Supermodel Free