mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-30 20:28:09 +00:00
fix babel config
This commit is contained in:
parent
6682647898
commit
0bb2573387
@ -1,8 +1,7 @@
|
|||||||
module.exports = (api) => {
|
module.exports = (api) => {
|
||||||
api.cache(true);
|
// api.cache.forever();
|
||||||
|
|
||||||
return {
|
const presets = [
|
||||||
presets: [
|
|
||||||
[
|
[
|
||||||
'@babel/preset-env',
|
'@babel/preset-env',
|
||||||
{
|
{
|
||||||
@ -12,8 +11,9 @@ module.exports = (api) => {
|
|||||||
],
|
],
|
||||||
'@babel/preset-react',
|
'@babel/preset-react',
|
||||||
'@babel/preset-flow',
|
'@babel/preset-flow',
|
||||||
],
|
];
|
||||||
plugins: [
|
|
||||||
|
const plugins = [
|
||||||
'react-hot-loader/babel',
|
'react-hot-loader/babel',
|
||||||
'@babel/plugin-transform-flow-strip-types',
|
'@babel/plugin-transform-flow-strip-types',
|
||||||
'@babel/plugin-proposal-class-properties',
|
'@babel/plugin-proposal-class-properties',
|
||||||
@ -38,13 +38,14 @@ module.exports = (api) => {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
'babel-plugin-styled-components',
|
'babel-plugin-styled-components',
|
||||||
],
|
];
|
||||||
env: {
|
|
||||||
test: {
|
if (api.env('test')) {
|
||||||
presets: [
|
presets.push('jest');
|
||||||
'jest',
|
}
|
||||||
],
|
|
||||||
},
|
return {
|
||||||
},
|
presets,
|
||||||
|
plugins,
|
||||||
};
|
};
|
||||||
};
|
};
|
Loading…
Reference in New Issue
Block a user