@mitsuhiko
I'm in favor of this proposal (I'm sure this comes as no surprise). I was just recently writing a design doc where I called out the need to preserve source maps for minified client JS we produce. I proposed using an arbitrary build # to match them back up. Tooling would be nice!
@TedMielczarek
We have an experimental way to inject stuff into that and it works. But without direct transpiler support you run into things like subresource integrity protection.
@mitsuhiko
This is great, hereβs to hoping this lands in the standard.
Quick question β //# debugId=DEBUG_ID β would it be easier (and/or faster) to parse this if it were at the beginning of the file, rather than the end? Especially when streaming responses are becoming popular again.
@thundubeedi
It absolutely would be. However, placing it at the beginning of the file means that a separate processing step could not add it without having to rewrite the sourcemap (as all tokens are moving).
@mitsuhiko
I would suggest providing some "recommended" code to generate suitable UUIDs (or whatever format is agreed for debug IDs) in Node and the browser. My past experience is that at scale, screw-ups here are likely.