It looks like the "/" is there for a chrome issue though, so unsure if this is a neat fix.
In a related note, there doesn't seem to be any way to tweak the source map handling from calling code - so I can't see a way to change this behaviour from my side without an upstream change.
This seems related to https://github.com/substack/node-browserify/issues/681
If i remove the leading "/" from https://github.com/ForbesLindesay/browserify-middleware/blob/master/lib/compile.js#L40 then it works.
It looks like the "/" is there for a chrome issue though, so unsure if this is a neat fix.
In a related note, there doesn't seem to be any way to tweak the source map handling from calling code - so I can't see a way to change this behaviour from my side without an upstream change.