Skip to content

Commit cb9a1c1

Browse files
committed
Configure babel to transform logical assignment
This should fix any future problems along the lines of matrix-org/matrix-js-sdk#3022.
1 parent 6ff0524 commit cb9a1c1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

babel.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ module.exports = {
2222
"@babel/plugin-proposal-object-rest-spread",
2323
"@babel/plugin-proposal-optional-chaining",
2424
"@babel/plugin-proposal-nullish-coalescing-operator",
25+
26+
// transform logical assignment (??=, ||=, &&=). preset-env doesn't
27+
// normally bother with these (presumably because all the target
28+
// browsers support it natively), but they make our webpack version (or
29+
// something downstream of babel, at least) fall over.
30+
"@babel/plugin-proposal-logical-assignment-operators",
31+
2532
"@babel/plugin-syntax-dynamic-import",
2633
"@babel/plugin-transform-runtime",
2734
],

0 commit comments

Comments
 (0)