20 lines
350 B
JavaScript
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
|
|
};
|
|
}
|