g6/.babelrc.js

27 lines
476 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,
},
],
'@babel/preset-react',
{
"plugins": [
"@babel/plugin-proposal-class-properties"
]
}
]
};
};