LearnNewsExamplesServices
Frontmatter
id7165
titleBuild Process: Ensure `parse5` bundle exists before template processing
stateClosed
labels
enhancement
assigneestobiu
createdAtAug 2, 2025, 6:11 PM
updatedAtAug 2, 2025, 6:17 PM
githubUrlhttps://github.com/neomjs/neo/issues/7165
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtAug 2, 2025, 6:17 PM

Build Process: Ensure parse5 bundle exists before template processing

Closed v10.3.1 enhancement
tobiu
tobiu commented on Aug 2, 2025, 6:11 PM

1. Summary

The build scripts that process HTML templates (templateBuildProcessor.mjs) have a dependency on the bundled dist/parse5.mjs file. The previous implementation assumed this file existed, which could cause the build to crash if scripts were run in a non-standard order or if the dist folder was cleaned without a full rebuild.

2. Rationale

A robust build process should not rely on implicit dependencies or a specific order of manual operations. By making the creation of the parse5 bundle an explicit and early step in the main build script, we eliminate a potential point of failure and make the entire system more predictable and resilient for all developers.

3. Scope & Implementation

  • File Modified: buildScripts/buildAll.mjs
  • Change: Added a new step to execute node ./buildScripts/bundleParse5.mjs at the beginning of the build process.
  • Placement: This step is placed immediately after the optional npm install and before any other build tasks (like buildThemes or buildESModules) are initiated.

4. Definition of Done

  • The buildAll.mjs script now reliably creates the parse5 bundle as one of its first actions.
  • The overall build process is more robust, and the implicit dependency within templateBuildProcessor.mjs is now satisfied automatically.
  • Developers running the standard build-all command will not encounter build failures related to the missing parse5.mjs file.
tobiu assigned to @tobiu on Aug 2, 2025, 6:11 PM
tobiu added the enhancement label on Aug 2, 2025, 6:11 PM
tobiu referenced in commit f7abe19 - "Build Process: Ensure parse5 bundle exists before template processing #7165" on Aug 2, 2025, 6:14 PM
tobiu closed this issue on Aug 2, 2025, 6:17 PM