mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 16:14:02 +00:00
Due to try-catch deoptimization, Babel strict mode for…of loops run about 5× slower in Firefox than Babel loose mode for…of, native for…of, or forEach (which are all about the same speed). Chrome doesn’t seem to care. For some reason we need to explicitly add the core-js Symbol polyfill near the beginning of the common bundle. Otherwise it gets loaded at the wrong time and the Casper tests fail. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
19 lines
489 B
JavaScript
19 lines
489 B
JavaScript
module.exports = {
|
||
presets: [
|
||
[
|
||
"@babel/preset-env",
|
||
{
|
||
corejs: 3,
|
||
loose: true, // Loose mode for…of loops are 5× faster in Firefox
|
||
useBuiltIns: "usage",
|
||
},
|
||
],
|
||
"@babel/typescript",
|
||
],
|
||
plugins: [
|
||
"@babel/proposal-class-properties",
|
||
["@babel/plugin-proposal-unicode-property-regex", { useUnicodeFlag: false }],
|
||
],
|
||
sourceType: "unambiguous",
|
||
};
|