Our project looks to take several files with a couple of node dependencies, and bundle them into one file with one entry point.
/src
-entry.js
-f1.js
-f2.js
-f3.js
The output of the bundle/function should be to set a global variable in a browser. In short, end result needs this to happen:
var _webVar = () => {return OBJECT_STUFF()} //set web global scope var
_webVar.init({config:{...}); //run the init function - done by client in tag manager/website code
So we can access _webVar from the global scope and let it do its thing. The end goal is to have this file stored in our CDN and clients simply add the source tag to their site for it to work.
Hoping to get an idea on best ways to integrate webpack into this build pipeline. Thanks.