mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 04:35:26 -05:00
56d826f255
* Force `Promise.allSettled` polyfill `Promise.allSettled` is required by `pdf.js`, but the polyfill is not available in the bundle. This forces babel to include the polyfill without having to process `pdf.js` with webpack/babel, which causes issues loading documents. * Updated core.js version for test config GitOrigin-RevId: 981da187352ffc8c59cb77ba55a0a9643bd7cc9a
42 lines
912 B
JSON
42 lines
912 B
JSON
{
|
|
"presets": [
|
|
[
|
|
"@babel/react",
|
|
{
|
|
"runtime": "automatic"
|
|
}
|
|
],
|
|
[
|
|
"@babel/env",
|
|
{
|
|
"useBuiltIns": "usage",
|
|
// This version must be aligned with the `core-js` version in `package.json`
|
|
"corejs": { "version": 3.6 }
|
|
}
|
|
]
|
|
],
|
|
"plugins": ["angularjs-annotate", "macros"],
|
|
// Target our current Node version in test environment, to transform and
|
|
// polyfill only what's necessary
|
|
"env": {
|
|
"test": {
|
|
"presets": [
|
|
[
|
|
"@babel/react",
|
|
{
|
|
"runtime": "automatic"
|
|
}
|
|
],
|
|
[
|
|
"@babel/env",
|
|
{
|
|
"targets": { "node": "12.21" },
|
|
"useBuiltIns": "usage",
|
|
// This version must be aligned with the `core-js` version in `package.json`
|
|
"corejs": { "version": 3.6 }
|
|
}
|
|
]
|
|
]
|
|
}
|
|
}
|
|
}
|