Frontmatter
| id | 7132 |
| title | Production Mode: Build-Time Parsing with `parse5` |
| state | Closed |
| labels | enhancement |
| assignees | tobiu |
| createdAt | Jul 30, 2025, 1:02 PM |
| updatedAt | Aug 2, 2025, 2:47 PM |
| githubUrl | https://github.com/neomjs/neo/issues/7132 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 7130 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Aug 2, 2025, 2:47 PM |

Description: For production builds, parsing HTML strings in the main thread is inefficient. Instead, we will pre-process the source code, identify the templates, and replace them with their JSON VDOM representation directly in the build output.
Implementation Details:
parse5(minified size: ~176KB). This is a robust and spec-compliant HTML parser.html...``).parse5to parse the string content into an abstract syntax tree (AST).parse5AST into the final Neo.mjs VDOM JSON format.