fix(build): Fix import of parent chunk's shim #7398
Merged
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
npm run format
andnpm run lint
The details
Resolves
Fixes error when loading playgrounds.
Proposed Changes
Have dependent chunks import
blockly.loader.mjs
instead ofblockly.mjs
.Behaviour Before Change
Trying to load playgrounds gives console error:
Behavior After Change
Loading playgrounds works correctly.
Reason for Changes
In PR #7380 it was suggested that the shims be renamed from (e.g.)
blockly.mjs
toblockly.loader.mjs
, and in commit 6f930f5 this was duly done, but alas one place was overlooked.The problem was not spotted in local testing because the
blockly.mjs
module that the blocks and generators chunks were attempting to import did still exist on disk, left over from before the change was made.Running
npm run clean
would have revealed the issue but alas that was not done.