Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build): Fix import of parent chunk's shim #7398

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

cpcallen
Copy link
Contributor

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

Fixes error when loading playgrounds.

Proposed Changes

Have dependent chunks import blockly.loader.mjs instead of blockly.mjs.

Behaviour Before Change

Trying to load playgrounds gives console error:

GET http://127.0.0.1:8080/build/blockly.mjs net::ERR_ABORTED 404 (Not Found)               javascript.loader.mjs:2

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 to blockly.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.

In PR google#7380 it was suggested[1] that the shims be renamed from
(e.g.) blockly.mjs to blockly.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.

[1] google#7380 (comment)
@cpcallen cpcallen requested a review from a team as a code owner August 16, 2023 12:55
@github-actions github-actions bot added the PR: fix Fixes a bug label Aug 16, 2023
@cpcallen cpcallen enabled auto-merge (squash) August 16, 2023 12:55
@cpcallen cpcallen merged commit 51be076 into google:develop Aug 16, 2023
10 checks passed
@cpcallen cpcallen deleted the refactor/6858/fix-shims branch August 16, 2023 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants