1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-04-04 17:36:22 +00:00

move babel configuration to js file

This commit is contained in:
slowbackspace 2019-02-04 15:09:35 +01:00
parent 6a8ee2bb03
commit 0b7b349344
2 changed files with 50 additions and 46 deletions

View File

@ -1,46 +0,0 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "entry",
"loose": true
}
],
"@babel/preset-react",
"@babel/preset-flow"
],
"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"
],
"env": {
"test": {
"presets": [
"jest"
]
}
}
}

50
babel.config.js Normal file
View File

@ -0,0 +1,50 @@
module.exports = (api) => {
api.cache(true);
return {
presets: [
[
'@babel/preset-env',
{
useBuiltIns: 'entry',
loose: true,
},
],
'@babel/preset-react',
'@babel/preset-flow',
],
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',
],
env: {
test: {
presets: [
'jest',
],
},
},
};
};