formatParseError() — vite Function Reference
Architecture documentation for the formatParseError() function in html.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD 8471f802_a431_7a1b_3e06_15a27483a128["formatParseError()"] f8fe0737_718a_5509_b722_473f207d5906["html.ts"] 8471f802_a431_7a1b_3e06_15a27483a128 -->|defined in| f8fe0737_718a_5509_b722_473f207d5906 6f95d645_04ef_21fe_68b7_4c732e603766["handleParseError()"] 6f95d645_04ef_21fe_68b7_4c732e603766 -->|calls| 8471f802_a431_7a1b_3e06_15a27483a128 310ed049_c1b4_c917_b399_81bab290e5a2["generateCodeFrame()"] 8471f802_a431_7a1b_3e06_15a27483a128 -->|calls| 310ed049_c1b4_c917_b399_81bab290e5a2 style 8471f802_a431_7a1b_3e06_15a27483a128 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/src/node/plugins/html.ts lines 299–315
function formatParseError(parserError: ParserError, id: string, html: string) {
const formattedError = {
code: parserError.code,
message: `parse5 error code ${parserError.code}`,
frame: generateCodeFrame(
html,
parserError.startOffset,
parserError.endOffset,
),
loc: {
file: id,
line: parserError.startLine,
column: parserError.startCol,
},
} satisfies RollupError
return formattedError
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does formatParseError() do?
formatParseError() is a function in the vite codebase, defined in packages/vite/src/node/plugins/html.ts.
Where is formatParseError() defined?
formatParseError() is defined in packages/vite/src/node/plugins/html.ts at line 299.
What does formatParseError() call?
formatParseError() calls 1 function(s): generateCodeFrame.
What calls formatParseError()?
formatParseError() is called by 1 function(s): handleParseError.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free