The local preview server serves the diagram script itself, so previews render offline.
What's wrong with this entry?
The local preview server that serves generated pages can now serve JavaScript as well as HTML. When a previewed page references the Mermaid diagram script, the server loads that bundle on demand and serves it as text/javascript, so diagrams render without reaching the network.
- Each served entry is now a body plus its own content type, rather than everything being forced to
text/html; charset=utf-8. - If the bundle cannot be read, the failure is swallowed and recorded as a
mermaid_bundle_unreadabletelemetry event; the page still loads without the diagram script.
mermaid_bundle_unreadable
Strings lifted out of the shipped bundle, so the claim above can be checked against them.