mirror of https://github.com/trezor/trezor-wallet
commit
3d18be60a5
@ -1,31 +0,0 @@
|
|||||||
{
|
|
||||||
"presets": [
|
|
||||||
["env", {
|
|
||||||
"useBuiltIns": true,
|
|
||||||
"loose": true
|
|
||||||
}],
|
|
||||||
"react"
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
"react-hot-loader/babel",
|
|
||||||
"transform-class-properties",
|
|
||||||
"transform-object-rest-spread",
|
|
||||||
"transform-flow-strip-types",
|
|
||||||
["transform-runtime", {
|
|
||||||
"polyfill": false,
|
|
||||||
"regenerator": true
|
|
||||||
}],
|
|
||||||
["module-resolver", {
|
|
||||||
"root": ["./src"],
|
|
||||||
"alias": {
|
|
||||||
"public": ["./public"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
"babel-plugin-styled-components"
|
|
||||||
],
|
|
||||||
"env": {
|
|
||||||
"test": {
|
|
||||||
"presets": ["jest"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,51 @@
|
|||||||
|
module.exports = (api) => {
|
||||||
|
// api.cache.forever();
|
||||||
|
|
||||||
|
const presets = [
|
||||||
|
[
|
||||||
|
'@babel/preset-env',
|
||||||
|
{
|
||||||
|
useBuiltIns: 'entry',
|
||||||
|
loose: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'@babel/preset-react',
|
||||||
|
'@babel/preset-flow',
|
||||||
|
];
|
||||||
|
|
||||||
|
const plugins = [
|
||||||
|
'react-hot-loader/babel',
|
||||||
|
'@babel/plugin-transform-flow-strip-types',
|
||||||
|
'@babel/plugin-proposal-class-properties',
|
||||||
|
'@babel/plugin-proposal-object-rest-spread',
|
||||||
|
[
|
||||||
|
'@babel/plugin-transform-runtime',
|
||||||
|
{
|
||||||
|
regenerator: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'module-resolver',
|
||||||
|
{
|
||||||
|
root: [
|
||||||
|
'./src',
|
||||||
|
],
|
||||||
|
alias: {
|
||||||
|
public: [
|
||||||
|
'./public',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'babel-plugin-styled-components',
|
||||||
|
];
|
||||||
|
|
||||||
|
if (api.env('test')) {
|
||||||
|
presets.push('jest');
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
presets,
|
||||||
|
plugins,
|
||||||
|
};
|
||||||
|
};
|
Loading…
Reference in new issue