2019-08-27 09:35:54 +00:00
|
|
|
module.exports = api => {
|
2022-05-05 07:54:28 +00:00
|
|
|
api.cache(true);
|
2019-08-27 09:35:54 +00:00
|
|
|
|
2019-08-27 11:02:47 +00:00
|
|
|
const presets = [
|
|
|
|
[
|
|
|
|
"@babel/preset-env",
|
|
|
|
{
|
|
|
|
corejs: "3.2.1",
|
2022-05-05 07:54:28 +00:00
|
|
|
modules: "auto",
|
2019-08-27 11:02:47 +00:00
|
|
|
useBuiltIns: "usage"
|
|
|
|
}
|
2019-08-27 09:35:54 +00:00
|
|
|
],
|
2019-08-27 11:02:47 +00:00
|
|
|
"@babel/preset-react",
|
|
|
|
"@babel/preset-typescript"
|
|
|
|
];
|
|
|
|
|
|
|
|
const plugins = [
|
|
|
|
"@babel/plugin-proposal-numeric-separator",
|
2020-02-20 14:18:22 +00:00
|
|
|
"@babel/plugin-proposal-optional-chaining",
|
2019-08-27 11:02:47 +00:00
|
|
|
"@babel/plugin-proposal-class-properties",
|
|
|
|
[
|
|
|
|
"@babel/plugin-proposal-decorators",
|
|
|
|
{
|
|
|
|
decoratorsBeforeExport: true
|
|
|
|
}
|
2019-08-27 09:35:54 +00:00
|
|
|
],
|
2019-08-27 11:02:47 +00:00
|
|
|
"@babel/plugin-proposal-object-rest-spread",
|
2020-12-01 13:13:05 +00:00
|
|
|
"@babel/plugin-proposal-nullish-coalescing-operator",
|
2022-05-05 07:54:28 +00:00
|
|
|
"macros"
|
2019-11-05 14:39:37 +00:00
|
|
|
];
|
|
|
|
|
2019-08-27 11:02:47 +00:00
|
|
|
return {
|
|
|
|
plugins,
|
2020-02-20 14:18:22 +00:00
|
|
|
presets
|
2019-08-27 09:35:54 +00:00
|
|
|
};
|
|
|
|
};
|