Signal-Desktop/.babelrc.js

16 lines
637 B
JavaScript
Raw Normal View History

2019-12-17 20:25:57 +00:00
module.exports = {
presets: ['@babel/preset-react', '@babel/preset-typescript'],
// Detects the type of file being babel'd (either esmodule or commonjs)
sourceType: 'unambiguous',
2019-12-17 20:25:57 +00:00
plugins: [
'react-hot-loader/babel',
'lodash',
'@babel/plugin-proposal-class-properties',
// This plugin converts commonjs to esmodules which is required for
// importing commonjs modules from esmodules in storybook. As a part of
// converting to TypeScript we should use esmodules and can eventually
// remove this plugin
process.env.SIGNAL_ENV === 'storybook' && '@babel/transform-runtime',
].filter(Boolean),
2019-12-17 20:25:57 +00:00
};