{"id":50991841,"url":"https://github.com/node-projects/monaco-editor-esm","last_synced_at":"2026-06-20T04:06:18.554Z","repository":{"id":356011169,"uuid":"1211096801","full_name":"node-projects/monaco-editor-esm","owner":"node-projects","description":"Real ESM version of vscode monaco editor","archived":false,"fork":false,"pushed_at":"2026-05-06T07:29:04.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-06T09:29:37.698Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://node-projects.github.io/monaco-editor-esm/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/node-projects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"jogibear9988","patreon":"jogibear9988"}},"created_at":"2026-04-15T04:10:26.000Z","updated_at":"2026-05-06T07:29:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/node-projects/monaco-editor-esm","commit_stats":null,"previous_names":["node-projects/monaco-editor-esm"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/node-projects/monaco-editor-esm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-projects%2Fmonaco-editor-esm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-projects%2Fmonaco-editor-esm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-projects%2Fmonaco-editor-esm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-projects%2Fmonaco-editor-esm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node-projects","download_url":"https://codeload.github.com/node-projects/monaco-editor-esm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-projects%2Fmonaco-editor-esm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34556513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-20T04:06:17.883Z","updated_at":"2026-06-20T04:06:18.542Z","avatar_url":"https://github.com/node-projects.png","language":"JavaScript","funding_links":["https://github.com/sponsors/jogibear9988","https://patreon.com/jogibear9988"],"categories":[],"sub_categories":[],"readme":"# @node-projects/monaco-editor-esm\r\n\r\n[![npm version](https://img.shields.io/npm/v/@node-projects/monaco-editor-esm.svg?style=flat-square)](https://www.npmjs.com/package/@node-projects/monaco-editor-esm)\r\n\r\n## Real ESM version of Monaco Editor\r\n\r\nThis package provides a true ESM (EcmaScript Module) build of the [Monaco Editor](https://github.com/microsoft/monaco-editor), suitable for modern build tools and direct browser usage. All JavaScript modules are available in the `/esm` directory, and all required CSS files are in `/min`.\r\n\r\n### Why ESM?\r\n- Native ESM modules allow for better tree-shaking, direct browser imports, and compatibility with modern bundlers (Webpack, Rollup, Vite, etc.).\r\n- The official Monaco Editor package is not fully ESM and includes AMD/CommonJS code and non-standard CSS imports.\r\n\r\n### Usage\r\n\r\n1. Install the package:\r\n   ```sh\r\n   npm install @node-projects/monaco-editor-esm\r\n   ```\r\n2. Import the editor in your code:\r\n   ```js\r\n   import * as monaco from '@node-projects/monaco-editor-esm/esm/vs/editor/editor.main.js';\r\n   ```\r\n3. Always include the CSS via a `\u003clink\u003e` tag in your **main HTML file** (`index.html`):\r\n   ```html\r\n   \u003clink rel=\"stylesheet\" href=\"node_modules/@node-projects/monaco-editor-esm/min/vs/editor/editor.main.css\"\u003e\r\n   ```\r\n   \u003e **Important:** The CSS **must** be loaded through a `\u003clink\u003e` element in the top-level document.\r\n   \u003e Monaco's CSS contains `@font-face` declarations (for Codicon icons), and `@font-face` rules inside\r\n   \u003e `adoptedStyleSheets` or Shadow DOM stylesheets are [ignored by browsers](https://github.com/WICG/construct-stylesheets/issues/119).\r\n   \u003e If you skip the `\u003clink\u003e`, editor icons will not render correctly.\r\n\r\n   If you are building a Web Component and still want to adopt the stylesheet for scoped styles, keep the\r\n   `\u003clink\u003e` in the host document **and** optionally adopt for the shadow root:\r\n   ```js\r\n   import editorStyle from '@node-projects/monaco-editor-esm/min/vs/editor/editor.main.css' with { type: 'css' };\r\n   shadowRoot.adoptedStyleSheets.push(editorStyle);\r\n   ```\r\n\r\n### CSS Import Caveats\r\n- The ESM modules may contain `import './file.css'` statements, which are not yet supported natively in browsers or Node.js. Most bundlers can handle these imports with the appropriate loader/plugin.\r\n- If you use the modules directly in the browser, you must include the CSS manually as shown above.\r\n- For more background, see the [discussion on ESM and CSS loading](https://github.com/microsoft/monaco-editor/issues/886#issuecomment-4248483831).\r\n\r\n### Limitations\r\n- Some features may require additional configuration for web workers. See Monaco Editor documentation for details.\r\n- The ESM build is not guaranteed to be 100% compatible with all Monaco Editor plugins or extensions.\r\n\r\n### Updating to a New Monaco Editor Release\r\n\r\nWhen a new version of Monaco Editor is released, update this package by running the `update-monaco` GitHub Actions workflow:\r\n\r\n1. Go to the **Actions** tab in your GitHub repository.\r\n2. Select the **Update Monaco Editor** workflow.\r\n3. Click **Run workflow** to trigger the update process.\r\n\r\nThis workflow will:\r\n- Install the latest Monaco Editor version\r\n- Update the package version\r\n- Rebuild the ESM and CSS outputs\r\n- Commit, tag, and (if configured) create a GitHub release for the new version\r\n\r\nAfter the workflow completes, verify the changes and publish the package if needed.\r\n\r\n### License\r\nMIT\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-projects%2Fmonaco-editor-esm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode-projects%2Fmonaco-editor-esm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-projects%2Fmonaco-editor-esm/lists"}