monaco-editor icon indicating copy to clipboard operation
monaco-editor copied to clipboard

Prevents injecting Node.js globals like `process`, which can break browser features (e.g., Mac `Cmd` key) when loading from ESM-based CDN like esm.sh.

Open dimaMachina opened this issue 9 months ago • 0 comments

If monaco-editor is loaded from ESM based CDNs, shortcuts which contain Cmd will not works on Mac and instead you should use Ctrl even you are using mac device

see https://esm.sh/monaco-editor

/* esm.sh - [email protected] */
import "/node/buffer.mjs";
import "/node/process.mjs";
export * from "/[email protected]/es2022/monaco-editor.mjs";

where buffer and process are polyfilled

ref https://github.com/esm-dev/esm.sh/issues/1134#issuecomment-2870426164

dimaMachina avatar Jun 10 '25 16:06 dimaMachina