Webpack: export to existing module in window Webpack: export to existing module in window reactjs reactjs

Webpack: export to existing module in window


output.library can be an array like below:

output: {    library: ['MyApp', 'something']}

This will either create an object on the window window.MyApp.something or, will add it to window.MyApp if it already exists.