mirror of
https://gitee.com/antv/g6.git
synced 2024-11-29 18:28:19 +08:00
27 lines
476 B
JavaScript
27 lines
476 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',
|
|
{
|
|
"plugins": [
|
|
"@babel/plugin-proposal-class-properties"
|
|
]
|
|
}
|
|
]
|
|
};
|
|
};
|