{"version":"2.1.248","anchor":"diagram-previews-load-their-rendering-script-from-the-local-","canonical_anchor":"diagram-previews-load-their-rendering-script-from-the-local-","heading":"Diagram previews load their rendering script from the local preview server","tier":"notice","area":"Artifacts","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.248\/e\/diagram-previews-load-their-rendering-script-from-the-local-","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.248","markdown":"### Diagram previews load their rendering script from the local preview server\n\nThe local preview server serves the diagram script itself, so previews render offline.\n\n**What**\n\nThe 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.\n\n**Details**\n\n- Each served entry is now a body plus its own content type, rather than everything being forced to `text\/html; charset=utf-8`.\n- If the bundle cannot be read, the failure is swallowed and recorded as a `mermaid_bundle_unreadable` telemetry event; the page still loads without the diagram script.\n\n**Evidence**\n\n`mermaid_bundle_unreadable`\n\n- Area: Artifacts\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5"}