3 Commits

Author SHA1 Message Date
Jonas Jenwald
6d8d6f1349
Revert "Remove unused variables with the Babel plugin" 2026-05-26 21:00:25 +02:00
Nicolò Ribaudo
2691868904 Remove unused variables with the Babel plugin
- functions were already removed
- variables can be removed when their initializer does not have side effects
- classes can be removed when they have no static blocks

Fixes #21337
2026-05-26 16:35:57 +02:00
Nicolò Ribaudo
46626ac64a
Update the Babel plugin to remove empty class constructors
This only happens when it's safe to do so. The exceptions are:
- when the class extends another subclass: removing the constructor would remove the error about the missing super() call
- when there are default parameters, that could have side effects
- when there are destructured prameters, that could have side effects
2024-05-13 11:51:43 +02:00