humus-old/babel.config.js
2019-05-05 04:27:05 -05:00

20 lines
350 B
JavaScript

module.exports = function (api) {
api.cache(true);
const presets = [
'@babel/preset-react',
'@babel/preset-env',
];
const plugins = [
'@babel/plugin-proposal-object-rest-spread',
];
if (process.argv.find((arg) => '--hot' === arg)) {
plugins.push('react-hot-loader/babel');
}
return {
presets,
plugins
};
}