Follow-up from "Upgrade Monaco and its webpack plugin [RUN AS-IF-FOSS]"
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=335261) </details> <!--IssueSummary end--> In the course of the Monaco upgrade we had to explcitely expose the monaco API globally. This is because a lot of places in the codebase still expect `window.monaco` to be available. This issue aims at refactoring those instances to explicitely import Monaco instead. This will also allow us to remove the explicit configuration of `MonacoWebpackPlugin` and Jest environments The following discussion from !63400 should be addressed: - [ ] @rob.hunt started a [discussion](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63400#note_619374156): (+1 comment) > **question (non-blocking):** Will we be looking at removing this in future? :thinking:. My assumption here is that this adds to the `window` object, which would mean we're keeping Monaco in memory whether we have the editor on the page or not. If that is the case, would it not be better to load as needed?
issue