How can I compile my code with webpack and babel so that the exported function is available in the global scope.
So for example:
export function test
check out: https://github.com/webpack/docs/wiki/library-and-externals#examples
By setting the library output property to whatever name you want to wrap your globals would allow you to then call: YourLibrary.test();
module.exports = {
entry: ['./_js/script.js'],
output: {
library: 'YourLibrary',
path: __dirname,
filename: './build/script.js'
}