humus-old/babel.client.config.js

15 lines
426 B
JavaScript
Raw Normal View History

2019-05-05 17:03:15 -05:00
const common = require('./babel.common.config');
module.exports = function(api) {
const config = common(api);
// Presets.
config.presets.push('@babel/preset-react');
config.presets.push('@babel/preset-env');
// Plugins.
config.plugins.push('@babel/plugin-proposal-object-rest-spread');
if (process.argv.find((arg) => '--hot' === arg)) {
config.plugins.push('react-hot-loader/babel');
}
return config;
}