Skip to content

Commit

Permalink
Configure babel to transform logical assignment
Browse files Browse the repository at this point in the history
This should fix any future problems along the lines of
matrix-org/matrix-js-sdk#3022.
  • Loading branch information
richvdh committed Jan 4, 2023
1 parent 6ff0524 commit cb9a1c1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ module.exports = {
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator",

// transform logical assignment (??=, ||=, &&=). preset-env doesn't
// normally bother with these (presumably because all the target
// browsers support it natively), but they make our webpack version (or
// something downstream of babel, at least) fall over.
"@babel/plugin-proposal-logical-assignment-operators",

"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-runtime",
],
Expand Down

0 comments on commit cb9a1c1

Please sign in to comment.