mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
* 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.
12 lines
364 B
TypeScript
12 lines
364 B
TypeScript
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();
|
|
}
|