overleaf/services/web/babel.config.json
Alf Eaton edbe12b86f Fix .cjs importing via webpack/babel (#11090)
GitOrigin-RevId: 62f17069a3e0fd338269fe772a51870222c2877a
2023-01-10 09:04:45 +00:00

22 lines
523 B
JSON

{
"presets": [
[
"@babel/env",
{
"useBuiltIns": "usage",
// This version must be aligned with the `core-js` version in `package.json`
"corejs": { "version": 3.6 }
}
],
["@babel/react", { "runtime": "automatic" }],
"@babel/typescript"
],
"plugins": ["angularjs-annotate", "macros"],
"overrides": [
// treat .cjs files (e.g. libraries symlinked into node_modules) as commonjs
{
"test": "../../**/*.cjs",
"sourceType": "script"
}
]
}