In a project I have this BabelJS configuration:
{
"presets": ["es2016"]
}
And somewhere in the code there is a method using the standard JS 'arguments' keyword to deal with a dynamic range of parameters. Something like this:
const myFunction = () => {
// pass all arguments with spread operator
someOtherFunction(...arguments);
}
myFunction('one', 'two', 3, {number: 4});
So far so good but when BabelJS is done, it has (1) defined 'arguments' as a global variable and (2) also in a way that is bound to fail in itself:
var arguments = arguments;
Is there a way to stop BabelJS from doing this? Either by configuration or some special comment to make exceptions?