A native ES-module build of the Monaco Editor â no AMD, no CommonJS, no bundler magic required. Import directly in the browser or wire into any modern bundler.
All modules are true import/export ES modules â no AMD loader, no require().
Import directly from a CDN or node_modules with a bare <script type="module">.
Full compatibility with Vite, Rollup, Webpack, esbuild, and other modern build tools via standard ESM exports.
All required styles are in /min. Adopt them as a CSSStyleSheet or via a plain <link>.
A GitHub Actions workflow tracks Monaco Editor releases and updates this package automatically.
100% Monaco Editor API â no wrapper, no abstraction. Switch from the official package with a one-line import change.
npm install @node-projects/monaco-editor-esm
import * as monaco from '@node-projects/monaco-editor-esm/esm/vs/editor/editor.main.js';
Always add this <link> to your top-level index.html.
Monaco's CSS contains @font-face rules for the Codicon icon font â
browsers ignore @font-face inside adoptedStyleSheets or
Shadow DOM, so the link tag in the main document is required for icons to render.
<link rel="stylesheet" href="node_modules/@node-projects/monaco-editor-esm/min/vs/editor/editor.main.css">
If you are using a Web Component you may additionally adopt the sheet for scoped styles,
but the top-level <link> must still be present:
import editorStyle from '@node-projects/monaco-editor-esm/min/vs/editor/editor.main.css' with { type: 'css' };
shadowRoot.adoptedStyleSheets.push(editorStyle);
const editor = monaco.editor.create(document.getElementById('container'), {
value: 'console.log("Hello, Monaco!");',
language: 'javascript',
theme: 'vs-dark',
});