I use babel.js and have a new module foo in my code
foo.js:
export function foo(number) {
return number + 42;
}
And bunch of big old files where everything is global. And I need to call a foo function from that legacy code.
bar.js:
...
var result = foo(0);
...
But I can't just import foo cause then my bar.js will be a module and unavailable from other old code. Is there a way to import module and retain my bar.js global?