g6/packages/core/.babelrc.js

27 lines
476 B
JavaScript
Raw Normal View History

2020-12-04 20:47:17 +08:00
module.exports = api => {
api.cache(() => process.env.NODE_ENV);
if (process.env.GATSBY === 'true') {
return {
presets: ['@babel/preset-env', 'babel-preset-gatsby'],
};
}
return {
presets: [
[
'@babel/preset-env',
{
loose: true,
modules: false,
},
],
'@babel/preset-react',
{
"plugins": [
"@babel/plugin-proposal-class-properties"
]
}
]
};
};