yacd/babel.config.js
2019-10-02 23:36:24 +08:00

35 lines
640 B
JavaScript

'use strict';
const presets = [
[
'@babel/preset-env',
{
modules: false,
// see also zloirock/core-js https://bit.ly/2JLnrgw
useBuiltIns: 'usage',
corejs: 3
}
],
'@babel/preset-react'
];
const plugins = [
'react-hot-loader/babel',
[
'@babel/plugin-transform-runtime',
{
corejs: false,
helpers: true,
regenerator: true,
useESModules: true
}
],
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-do-expressions'
];
module.exports = api => {
api.cache(true);
return { presets, plugins };
};