Repository navigation
feat!: Update more plugins to ESM - #10656
Merged
lizschwab merged 6 commits intoNov 4, 2026
Merged
Conversation
Contributor
Author
|
Failing check is expected. |
gonfunko
approved these changes
Nov 4, 2026
lizschwab
merged commit Nov 4, 2026
323d661
into
RaspberryPiFoundation:plugin-esm
6 of 8 checks passed
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.
The basics
The details
Resolves
Towards #10642
Proposed Changes
Update the following plugins to ESM:
Additionally, updated the target to es2020 in dev-scripts, as this puts the plugins on the same target as blockly and reduces potential conflicts.
Reason for Changes
Plugin ESM migration
Documentation
See breaking changes
BREAKING CHANGES
The following changes affect all plugins:
@blockly/*fromnode_modules.<script>tags or AMD, you will need to use an import map with<script type="module">. Additionally, you will need to replace eachwindow.Xglobal with animportstatement.<script>-tag users:esm.sh, as it converts packages to ESM on request. You will need a CDN that converts packages to ES modules to import blockly. Plugins can still be loaded directly from CDNs such as unpkg.import '@blockly/dev-tools/src/playground/options.js')@blocklyplugins, you will need to import from the root instead. If something you depend on isn't exported, you should open an issue and we will evaluate whether it should be exported.The following changes affect plugins included in this PR:
addGUIControlsmethod now returns a PromiseaddGUIControlsto build their own playground will need toawaitor use.then().