Enable array spread and destructuring through recommended Babel polyfills
What does this MR do?
Adds a polyfill for the Symbol
class and Array.from()
as recommended by babel. Some babel transforms (array spread, array destructuring, for..of
, etc) rely on these features behind the scenes and will break in some browsers when they are not available.
The Airbnb style guide mandates the use of some of these methods, so I think it's a good idea to have them available:
- https://github.com/airbnb/javascript#functions--spread-vs-apply
- https://github.com/airbnb/javascript#es6-array-spreads
- https://github.com/airbnb/javascript#destructuring--array
Are there points in the code the reviewer needs to double check?
All tests should pass. I added an example of array destructuring within diff.js
which will fail without the polyfill. There are other examples already in our codebase which won't work in IE, but for one reason or another do not cause any test failures. This should fix those as well.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated [ ] API support added- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #25188 (closed), #24922 (closed)