g6/.babelrc.js

22 lines
378 B
JavaScript
Raw Normal View History

module.exports = api => {
api.cache(() => process.env.NODE_ENV);
if (process.env.GATSBY === 'true') {
return {
2020-02-14 10:10:54 +08:00
presets: ['@babel/preset-env', 'babel-preset-gatsby'],
};
}
return {
presets: [
[
'@babel/preset-env',
{
loose: true,
2020-02-14 10:10:54 +08:00
modules: false,
},
],
2020-02-14 10:10:54 +08:00
'@babel/preset-react',
],
};
};