I have a simple Typescript web app with Webpack and I am trying to include a plain javascript library that doesn't export any modules/functions. The instructions require you to add a Script tag and this adds objects and functions into Globals which can be used throughout the application. Rather than doing this I would like to use webpack to bundle it up in the final javascript bundle and also make it's exposed objects and functions available in globals (so it can be used in the same way intended).
So far the only way I can get webpack to include the javascript in the bundle is by adding the following into my index.ts:
require("./lib/exolve-m")
Whilst this packages the javascript, it's wrapping it (as it should) in a function which exposes the exports. However this package doesn't use the export keyword and also they aren't loaded into the global namespace. So I'm left with bundled code that I can't access.
What's the right way to do this please?