15 lines
426 B
JavaScript
15 lines
426 B
JavaScript
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;
|
|
}
|