Skip to content

Conversation

@mikeharv
Copy link
Contributor

@mikeharv mikeharv commented May 15, 2025

Alternative to:

This PR removes "loose": true from the @babel/plugin-transform-classes plugin only when transpiling Blockly.

In our environment, "loose": true causes Babel to transpile super.prop = value as this.prop = value. When Blockly introduced the size_ accessor in FieldInput, our transpilation led to infinite recursion: super.size_ = val was rewritten as this.size_ = val.

This override impacts everywhere except two specific folders, hopefully avoiding the regressions introduced by #65894

This change avoids the recursion bug introduced by Babel rewriting super.size_ = val as this.size_ = val, which broke Blockly’s new accessor-based Field implementation.

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@mikeharv mikeharv closed this May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant