Repository navigation
Fix load order for 'screenshot-tool' - #11778
Merged
Merged
Conversation
Galen Nickel (ganicke)
requested review from
Abhijith Chatra (abchatra) and
Hassan Sufi (aznhassan)
November 22, 2026 01:11
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The worker’s baseUrl incorrectly points to the vs directory, producing min/vs/vs/... module URLs that prevent the JavaScript language worker from loading.
1 open issue
What changed in this PR
This PR updates Monaco initialization in the MakeCode block screenshot tool, aiming to restore the editor by loading its dependencies in the correct order.
Changes:
- Loads Monaco through its AMD loader before starting the screenshot tool script.
- Adds a worker bootstrap for Monaco assets hosted on another origin.
- Reformats the HTML without changing the page layout.
| File | Description |
|---|---|
docs/screenshot-tool.html |
Updates Monaco load order and worker configuration; reformats the markup. |
Review effort: Max
| window.MonacoEnvironment = { | ||
| getWorkerUrl: function () { | ||
| return `data:text/javascript;charset=utf-8,${encodeURIComponent(` | ||
| self.MonacoEnvironment = { baseUrl: '${vsBase}/' }; |
There was a problem hiding this comment.
Turns out this doesn’t get used: editor.main replaces MonacoEnvironment with its own worker, and the old workerMain.js path doesn’t exist in the hosted Monaco build, so I removed it; workers still load from vs/assets
Member
|
Related issue: #10873 |
Abhijith Chatra (abchatra)
requested a review
from Joey Wunderlich (jwunderl)
November 24, 2026 23:28
Joey Wunderlich (jwunderl)
approved these changes
Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Looks like the Screenshot tool is broken. It seems that Monaco updated its load structure?