LearnNewsExamplesServices
Frontmatter
id7786
titleEnhance App Worker to Handle SSR cssMap
stateClosed
labels
enhancementai
assigneestobiu
createdAtNov 17, 2025, 11:44 PM
updatedAtNov 17, 2025, 11:49 PM
githubUrlhttps://github.com/neomjs/neo/issues/7786
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 17, 2025, 11:49 PM

Enhance App Worker to Handle SSR cssMap

Closed v11.5.0 enhancementai
tobiu
tobiu commented on Nov 17, 2025, 11:44 PM

To support the SSR "takeover" process, the App worker needs to be aware of the CSS files that were already included in the server-rendered HTML. This prevents the client from redundantly re-requesting the same theme files.

Change:

  • src/worker/App.mjs -> createThemeMap():
    • This method is enhanced to check for Neo.config.cssMap after the main theme-map.json is loaded.
    • If Neo.config.cssMap exists (meaning it was passed from the SSR process), its contents are merged into the global Neo.cssMap. This ensures that when insertThemeFiles() is called, it correctly recognizes which CSS has already been handled by the server.
    • The Neo.config.cssMap is deleted after the merge to prevent re-processing.

This change ensures efficient and correct CSS management during the SSR takeover process.

tobiu added the enhancement label on Nov 17, 2025, 11:44 PM
tobiu added the ai label on Nov 17, 2025, 11:44 PM
tobiu assigned to @tobiu on Nov 17, 2025, 11:48 PM
tobiu referenced in commit ceb5f9d - "Enhance App Worker to Handle SSR cssMap #7786" on Nov 17, 2025, 11:48 PM
tobiu closed this issue on Nov 17, 2025, 11:49 PM