mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 02:10:45 -06:00
2281abaf37
* Revert "Update babel monorepo to v7.21.0 (#63532)" This reverts commit3d974fc716
. * Revert "Chore: Remove babel deps and config (#62461)" This reverts commit21a988a659
.
63 lines
1.4 KiB
JSON
63 lines
1.4 KiB
JSON
{
|
|
"babelrc": false,
|
|
// Note: order is bottom-to-top and/or right-to-left
|
|
"presets": [
|
|
[
|
|
"@babel/preset-env",
|
|
{
|
|
"bugfixes": true,
|
|
"browserslistEnv": "dev",
|
|
"useBuiltIns": "entry",
|
|
"corejs": "3.10"
|
|
}
|
|
],
|
|
[
|
|
"@babel/preset-typescript",
|
|
{
|
|
"allowNamespaces": true,
|
|
"allowDeclareFields": true
|
|
}
|
|
],
|
|
[
|
|
"@babel/preset-react",
|
|
{
|
|
"runtime": "automatic"
|
|
}
|
|
]
|
|
],
|
|
"plugins": [
|
|
[
|
|
"@babel/plugin-transform-typescript",
|
|
{
|
|
"allowNamespaces": true,
|
|
"allowDeclareFields": true
|
|
}
|
|
],
|
|
// added to mitigate https://github.com/babel/babel/issues/14289
|
|
// package (and following line) can be removed once the issue is fixed and released
|
|
"@babel/plugin-proposal-class-properties",
|
|
["@babel/plugin-proposal-object-rest-spread", { "loose": true }],
|
|
"@babel/plugin-transform-react-constant-elements",
|
|
"@babel/plugin-proposal-nullish-coalescing-operator",
|
|
"@babel/plugin-proposal-optional-chaining",
|
|
"@babel/plugin-syntax-dynamic-import", // needed for `() => import()` in routes.ts
|
|
"angularjs-annotate",
|
|
"macros"
|
|
],
|
|
"env": {
|
|
"production": {
|
|
"presets": [
|
|
[
|
|
"@babel/preset-env",
|
|
{
|
|
"browserslistEnv": "production"
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"hot": {
|
|
"plugins": ["react-refresh/babel"]
|
|
}
|
|
}
|
|
}
|