microsoft / microsoft/monaco-editor
The global window object is polluted after monaco-editor initialization
@alexdima is already working on this.
Since Apr 25, 2022.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.