g6/.babelrc.js
2020-02-14 11:30:12 +08:00

22 lines
378 B
JavaScript

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',
],
};
};