Uses rollup for ESM build and d.ts bundling. (#5048)

* Uses rollup for ESM build and d.ts bundling.
Moves monaco.languages.{typescript, json, html, css} to monaco.*.
Moves monaco.editor.createWebWorker to monaco.createWebWorker.

* Adds excluded files from dist, as they needed to be patched.
This commit is contained in:
Henning Dieterichs 2025-10-13 18:05:43 +02:00 committed by GitHub
parent 0fd6f29a23
commit 5a7e917587
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 1795 additions and 712 deletions

View file

@ -0,0 +1,12 @@
import * as monaco from 'monaco-editor-core/esm/vs/editor/editor.api.js';
export function getGlobalMonaco(): any {
return monaco;
}
// TODO@hediet get rid of the monaco global
const monacoEnvironment: monaco.Environment | undefined = (globalThis as any).MonacoEnvironment;
if (monacoEnvironment?.globalAPI) {
(globalThis as any).monaco = getGlobalMonaco();
}