Skip to content

Follow-up from "Upgrade Monaco and its webpack plugin [RUN AS-IF-FOSS]"

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 (merged) should be addressed:

  • @rob.hunt started a discussion: (+1 comment)

    question (non-blocking): Will we be looking at removing this in future? 🤔. 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?