Commit d9191a87 authored by Lukas Eipert's avatar Lukas Eipert

Transpile nullish coalesing and optional chaining operators

Our version of webpack's acorn is too old and throws errors when we are
not transpiling the optional chaining operators `?.` and nullish
coalescing operators `??` even though all our targeted browsers support
it.

Therefore we need to enable
[`@babel/plugin-proposal-optional-chaining`][0] and
[`@babel/plugin-proposal-nullish-coalescing-operator`][1] manually.

After we have updated to webpack@5, we can disable these plugins.

[0]: https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining
[1]: https://babeljs.io/docs/en/babel-plugin-proposal-nullish-coalescing-operator
parent 24c8a6b7
......@@ -19,6 +19,10 @@ const plugins = [
'@babel/plugin-proposal-private-methods',
// See: https://gitlab.com/gitlab-org/gitlab/-/issues/229146
'@babel/plugin-transform-arrow-functions',
// See: https://gitlab.com/gitlab-org/gitlab/-/issues/336216
'@babel/plugin-proposal-optional-chaining',
// See: https://gitlab.com/gitlab-org/gitlab/-/issues/336216
'@babel/plugin-proposal-nullish-coalescing-operator',
'lodash',
];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment