2020-02-03 23:51:19 +00:00
|
|
|
module.exports = api => {
|
|
|
|
api.cache(true);
|
|
|
|
|
|
|
|
return {
|
|
|
|
env: {
|
|
|
|
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
|
|
|
|
};
|
|
|
|
};
|