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.
Summary
This release addresses an issue discovered in the 5.12.3 release, where bundled gateway scripts trigger errors.
Issue MWC-16791
Details
This was a very enigmatic issue to track down. Recently, our NPM deps were updated, which included a major upgrade to
parcel
- from v1 to v2. Parcel v2 compiles code to JS modules and requires thetype="module"
attribute on the script tags when loading. Because the compiled assets were loaded as regular JS, it caused aTypeError
when the script was executed.Unfortunately, WP only added
wp_enqueue_script_module
in 6.5 (this year), and adding thetype
attribute in earlier WP versions requires some filtering. Even when I tried adding the type attribute, I ran into other issues.The change to using modules requires far more QA than downgrading parcel at the moment, which is why this PR has chosen the latter. I suggest we circle back to upgrading parcel later when we have more time to dedicate to it.
QA