forked from grafana/grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Move babel config to a root babel.config.json (grafana#41615)
* Chore: Move babel config to a root babel.config.json * Re-add babel cache settings to webpack * Re-add production browserlist in babel config * re-add babel hot refresh config * fix storybook
- Loading branch information
Showing
7 changed files
with
73 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"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 | ||
} | ||
], | ||
["@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" | ||
], | ||
"env": { | ||
"production": { | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"browserslistEnv": "production" | ||
} | ||
] | ||
] | ||
}, | ||
"hot": { | ||
"plugins": ["react-refresh/babel"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters