You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
377 B
28 lines
377 B
1 year ago
|
module.exports = function(api) {
|
||
|
api.cache(true);
|
||
|
|
||
|
let presets;
|
||
|
|
||
|
if (process.env.NODE_ENV === 'es') {
|
||
|
presets = [
|
||
|
[
|
||
|
"@babel/preset-env",
|
||
|
{
|
||
|
"modules": false
|
||
|
}
|
||
|
]
|
||
|
];
|
||
|
} else if (process.env.NODE_ENV === 'umd') {
|
||
|
presets = [
|
||
|
[
|
||
|
"@babel/preset-env"
|
||
|
]
|
||
|
];
|
||
|
}
|
||
|
|
||
|
return {
|
||
|
plugins: ['@babel/plugin-transform-object-assign'],
|
||
|
presets
|
||
|
};
|
||
|
};
|