MurhafSousli / ngx-highlightjs

Angular syntax highlighting module
https://ngx-highlight.netlify.app/
MIT License
272 stars 35 forks source link

Code is not rendered in SSR #282

Open hartmannm opened 1 month ago

hartmannm commented 1 month ago

Reproduction

Steps to reproduce:

  1. ng new --ssr
  2. Importing Core Library and Languages as it is described here
  3. Create new component and add pre tag <pre > <code [highlight]="enableServerSideRenderingCode" language="xml"></code> </pre>
  4. Execute npm run build
  5. Check dist//browser//index.html
  6. Code block is not rendered

Expected Behavior

Highlighting is working for SSR

Actual Behavior

Code tags are empty

Environment

MurhafSousli commented 1 month ago

The demo app is running in SSR mode, The code is highlighted in runtime in the browser not on the server