2018-11-05 05:06:39 -05:00
|
|
|
{
|
2024-08-14 06:42:18 -04:00
|
|
|
"compact": false,
|
2018-11-05 05:06:39 -05:00
|
|
|
"presets": [
|
2021-06-23 05:37:08 -04:00
|
|
|
[
|
|
|
|
"@babel/env",
|
|
|
|
{
|
|
|
|
"useBuiltIns": "usage",
|
2021-12-14 08:25:25 -05:00
|
|
|
// This version must be aligned with the `core-js` version in `package.json`
|
2023-12-08 04:36:41 -05:00
|
|
|
"corejs": { "version": "3.30" },
|
2024-01-12 05:08:33 -05:00
|
|
|
"exclude": [
|
|
|
|
// Exclude Array.prototype.push polyfill, as it's not needed and affects performance in Chrome
|
|
|
|
"es.array.push",
|
|
|
|
// Exclude objectSpread polyfill, as it's not needed and affects performance
|
|
|
|
"@babel/plugin-transform-object-rest-spread",
|
|
|
|
// Exclude _defineProperty polyfill, as it causes a bug without the objectSpread polyfill
|
2024-02-09 04:18:00 -05:00
|
|
|
"@babel/plugin-transform-computed-properties",
|
|
|
|
// Use native async functions, for performance
|
|
|
|
"@babel/plugin-transform-async-to-generator",
|
|
|
|
// Use native generators, for performance
|
|
|
|
"@babel/plugin-transform-regenerator",
|
|
|
|
// Use native async generators, for performance
|
|
|
|
"@babel/plugin-transform-async-generator-functions",
|
|
|
|
// Use native for-of loops, for performance
|
|
|
|
"@babel/plugin-transform-for-of"
|
2024-01-12 05:08:33 -05:00
|
|
|
]
|
2021-06-23 05:37:08 -04:00
|
|
|
}
|
2022-05-19 08:41:50 -04:00
|
|
|
],
|
|
|
|
["@babel/react", { "runtime": "automatic" }],
|
|
|
|
"@babel/typescript"
|
2019-07-16 05:13:18 -04:00
|
|
|
],
|
2024-06-05 04:33:11 -04:00
|
|
|
"plugins": ["macros"],
|
2023-01-09 07:52:55 -05:00
|
|
|
"overrides": [
|
|
|
|
// treat .cjs files (e.g. libraries symlinked into node_modules) as commonjs
|
|
|
|
{
|
|
|
|
"test": "../../**/*.cjs",
|
|
|
|
"sourceType": "script"
|
2024-08-01 06:45:38 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"test": "../../libraries/overleaf-editor-core/**/*.js",
|
|
|
|
"sourceType": "script"
|
2023-01-09 07:52:55 -05:00
|
|
|
}
|
|
|
|
]
|
2020-09-15 08:48:08 -04:00
|
|
|
}
|