Ok, some more progress here.. I actually got this working, but it required hacking some more stuff in node_modules. In particular:
I installed 14.1.0 of browserify, and modified index.js line 32 to be:
var cpr = require('cached-path-relative');
var relativePath = (...args) => cpr.apply(cpr, args).replace(/\\/g,'/')
Although it doesn't seem to be required, I think we should also set exposeAll in the browserify config (bundlegen line ~181 exposeAll: true, ), as it has the result of putting relative paths instead of full paths in the bundle, which seems to make a lot more sense than seeing some randomness in there (right now, it's paths like: /home/ubuntu/slave/workspace/Blue Ocean docker image/blueocean/blueocean-dashboard/node_modules/asn1.js/lib/asn1/base/buffer.js).
Doesn't seem to make a difference but require_stub_transform var node_modules_path = '/node_modules/'; maybe should be using path.sep.
Issued https://github.com/jonjaques/gulp-runner/pull/1 to fix gulp-runner, though we could just write the spawn command ourselves...