The global window object is polluted after monaco-editor initialization
Just a possible bug I assume,
I landed in this repo by debugging https://www.npmjs.com/package/monaco-editor and its dependency on https://www.npmjs.com/package/monaco-editor-core which is basically leads to this repo. The issue is that if you try to use monaco-editor in your project (not vscode), it will pollute the global window object by setting define property in there which is leading to possible issues. For example, here in babel. As result, if I need to use babel-standalone after monaco-editor initialization, the babel check will not be invoked properly (as it will detect window.define.amd).
Is there any reason why define implementation (in here) is made on global window object?
I met this issue when in sandbox
Is there any progress on this issue?
If you load the editor via AMD, a global define will be in the global scope. If you load the editor via ESM, then there will be no globals defined.