LearnNewsExamplesServices
Frontmatter
id7788
titleEpic: Unify highlight.js architecture for Browser and SSR
stateClosed
labels
enhancementai
assigneestobiu
createdAtNov 18, 2025, 10:24 AM
updatedAtNov 18, 2025, 9:07 PM
githubUrlhttps://github.com/neomjs/neo/issues/7788
authortobiu
commentsCount0
parentIssuenull
subIssues
7791 Refactor ContentComponent to use new highlight.js utilities
subIssuesCompleted1
subIssuesTotal1
blockedBy[]
blocking[]
closedAtNov 18, 2025, 9:07 PM

Epic: Unify highlight.js architecture for Browser and SSR

Closed v11.5.0 enhancementai
tobiu
tobiu commented on Nov 18, 2025, 10:24 AM

Our goal is to unify the code highlighting logic across the entire platform, making it work seamlessly for both client-side rendering (in the browser) and server-side rendering (in Node.js). This will allow us to remove the dependency on the main-thread addon and simplify the architecture.

The core challenge is that the stock npm package is a CommonJS module, which is incompatible with the Neo.mjs zero-builds development environment in the browser.

The Plan

This epic will be achieved by completing the following sub-tasks:

  1. Create a Universal ESM Bundle for (#7790): We will build our own custom, lightweight ES module version of that includes only the languages our project needs. This single bundle will work in both Node.js and the browser.
  2. Create a Line Numbering Utility (#7789): We will create a simple, dependency-free utility to add line number markup to the HTML generated by .
  3. Refactor (#7791): Once the utilities are in place, we will refactor to use them directly, removing the old main thread addon and consolidating all styling into a single, reusable SCSS file.
tobiu added the enhancement label on Nov 18, 2025, 10:24 AM
tobiu added the ai label on Nov 18, 2025, 10:24 AM
tobiu cross-referenced by #7789 on Nov 18, 2025, 10:44 AM
tobiu assigned to @tobiu on Nov 18, 2025, 10:44 AM
tobiu added sub-issue #7791 on Nov 18, 2025, 11:13 AM
tobiu changed title from Create a node-compatible highlight.js utility for SSR to Epic: Unify highlight.js architecture for Browser and SSR on Nov 18, 2025, 11:21 AM
tobiu closed this issue on Nov 18, 2025, 9:07 PM