Monaco Editor with Shiki highlighting, no web workers or CSS loaders

AI-generated summary of reporting by GitHub Opensource Projects. Read the original for the full story.

Why it matters

Developers embedding Monaco editors in browser apps can now skip web worker, CSS loader and MonacoEnvironment configuration entirely.

Read this as

Modern Monaco is a free, open-source JavaScript package that wraps Monaco, the code editor that powers Microsoft's VS Code app. Normally, adding Monaco to a website involves fiddly configuration steps; this wrapper removes them and uses a tool called Shiki to colorize code instead. It also shows highlighted code instantly while the full editor loads, and can render on the server first. It helps developers building coding playgrounds or documentation sites, though its makers warn the interface may change at any time.

Monaco's setup burden, web workers, CSS loaders, bundler configuration, has long been the cost of embedding the VS Code editor in a web app, and teams routinely burn an afternoon per integration. Modern Monaco, an open-source wrapper installable via npm or esm.sh, eliminates that configuration while adding Shiki highlighting and server-side rendering. The risk: the README states the API may change at any time, so production use is a bet on an immature dependency.

Modern Monaco replaces Monaco's built-in tokenizer with Shiki grammars and themes, and its 'lazy mode' pre-highlights code via Shiki while monaco-editor-core loads, swapping in the real editor on ready. SSR is demonstrated via renderToWebComponent and hydrate in a Cloudflare Worker fetch handler. Bare-specifier imports resolve through import maps, and .d.ts files load automatically from esm.sh for type checking. Limitations: no version number, no benchmarks, and the API is explicitly subject to change.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Monaco Editor Modern Monaco Shiki VS Code esm.sh Cloudflare Worker

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading

datasette-charts 0.5a0

Datasette Charts 0.5a0 adds calendar heatmaps, box plots and active-over-time charts, enabling richer data visualisation directly in the browser without extra libraries.