mirror of
https://gitee.com/antv/g6.git
synced 2024-12-12 12:35:18 +08:00
22 lines
378 B
JavaScript
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',
|
|
],
|
|
};
|
|
};
|