2020-02-03 23:51:19 +00:00
|
|
|
module.exports = api => {
|
|
|
|
api.cache(true);
|
|
|
|
|
|
|
|
return {
|
|
|
|
env: {
|
2020-04-03 18:07:30 +00:00
|
|
|
node: {
|
2020-04-03 15:30:32 +00:00
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
"@babel/preset-env",
|
|
|
|
{
|
|
|
|
corejs: 3,
|
|
|
|
shippedProposals: true,
|
|
|
|
targets: {node: "current"},
|
|
|
|
useBuiltIns: "usage"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
[
|
|
|
|
"@babel/plugin-transform-runtime",
|
|
|
|
{
|
|
|
|
corejs: 3
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"@babel/plugin-proposal-export-default-from",
|
|
|
|
"@babel/plugin-proposal-class-properties",
|
|
|
|
"@babel/plugin-proposal-private-methods",
|
|
|
|
"@babel/plugin-proposal-nullish-coalescing-operator",
|
|
|
|
"@babel/plugin-proposal-optional-chaining",
|
|
|
|
"@babel/plugin-transform-react-jsx"
|
|
|
|
]
|
|
|
|
},
|
2020-02-03 23:51:19 +00:00
|
|
|
browser: {
|
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
"@babel/preset-env",
|
|
|
|
{
|
|
|
|
corejs: 3,
|
|
|
|
modules: false,
|
|
|
|
shippedProposals: true,
|
2020-03-04 18:24:51 +00:00
|
|
|
targets: {browsers: "defaults"},
|
2020-02-03 23:51:19 +00:00
|
|
|
useBuiltIns: "usage"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
[
|
|
|
|
"@babel/plugin-transform-runtime",
|
|
|
|
{
|
|
|
|
corejs: 3,
|
|
|
|
useESModules: true
|
|
|
|
}
|
|
|
|
],
|
2020-03-04 18:18:22 +00:00
|
|
|
"@babel/plugin-proposal-export-default-from",
|
2020-02-12 19:53:33 +00:00
|
|
|
"@babel/plugin-proposal-class-properties",
|
2020-02-14 22:52:01 +00:00
|
|
|
"@babel/plugin-proposal-private-methods",
|
|
|
|
"@babel/plugin-proposal-nullish-coalescing-operator",
|
2020-03-04 18:24:51 +00:00
|
|
|
"@babel/plugin-proposal-optional-chaining",
|
|
|
|
"@babel/plugin-transform-react-jsx"
|
2020-02-03 23:51:19 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
"@babel/preset-env",
|
|
|
|
{
|
|
|
|
corejs: 3,
|
|
|
|
modules: false,
|
|
|
|
shippedProposals: true,
|
2020-03-04 18:24:51 +00:00
|
|
|
targets: {node: "current"},
|
2020-02-03 23:51:19 +00:00
|
|
|
useBuiltIns: "usage"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
[
|
|
|
|
"@babel/plugin-transform-runtime",
|
|
|
|
{
|
|
|
|
corejs: 3,
|
|
|
|
useESModules: true
|
|
|
|
}
|
|
|
|
],
|
2020-03-04 18:18:22 +00:00
|
|
|
"@babel/plugin-proposal-export-default-from",
|
2020-02-12 19:53:33 +00:00
|
|
|
"@babel/plugin-proposal-class-properties",
|
2020-02-14 22:52:01 +00:00
|
|
|
"@babel/plugin-proposal-private-methods",
|
|
|
|
"@babel/plugin-proposal-nullish-coalescing-operator",
|
2020-03-04 18:24:51 +00:00
|
|
|
"@babel/plugin-proposal-optional-chaining",
|
|
|
|
"@babel/plugin-transform-react-jsx"
|
2020-02-03 23:51:19 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
sourceMaps: true
|
|
|
|
};
|
|
|
|
};
|