Open matt-ball opened 4 years ago
We could potentially copy the approach of this template: https://explore.postman.com/templates/7170/browserify-cdn-modules.
Look at the collection pre-request script. We can make it a bit less complex by assuming variables are only at the collection level and assuming variable values are already populated (because we own Browserify bundling in this case).
We'd have to alter each script that has dependencies to be prefixed with:
new Function(pm.variables.get('init'))(pm);
But it's less intrusive than the raw Browserify bundle.
Bundling happens on a per request level meaning libraries may be imported multiple times.