You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 26, 2026. It is now read-only.
Repository navigation
Commit cfc690d
Browse filesBrowse the repository at this point in the historyBrowse files
fix(console): self-host monaco and brand icons instead of CDN (#23)
The YAML view on deploy/edit forms intermittently hung on a "Loading…"
placeholder forever. @monaco-editor/react, with no loader configured and
no bundled monaco, falls back to fetching the whole editor from jsDelivr
at runtime; on a slow, proxied, or air-gapped network the multi-megabyte
editor.main.js stalls and the fallback never clears. The sidebar brand
icons (simple-icons) were pulled from the same CDN, so neither subsystem
worked without reliable egress to cdn.jsdelivr.net.
Bundle both instead so nothing is fetched from a CDN at runtime:
- Add monaco-editor as a direct dep and configure @monaco-editor/react
via loader.config({ monaco }) with the language workers wired to the
bundled copies (monaco-setup.ts). loader.init() short-circuits on the
provided instance before it would ever inject the jsDelivr script.
- Lazy-load YamlEditor so monaco and its workers are code-split into
their own chunk, fetched from the app's own origin only when the YAML
view is opened — the initial bundle is unaffected.
- Inline simple-icons SVGs as data URIs from the bundled package. Amazon
S3 was removed upstream from simple-icons, so the Bucket kind now falls
back to a generic Lucide storage glyph.
A production build shows simple-icons fully inlined and the only
remaining jsDelivr string is the unreachable default paths.vs inside the
third-party loader, which loader.init() never reaches once monaco is
provided.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
0 commit comments