@mitsuhiko
Armin Ronacher
1 year
We want to fundamentally change how source maps and minified JavaScript files are linked by introducing globally unique Debug IDs. Here is why:
5
22
103

Replies

@mitsuhiko
Armin Ronacher
1 year
We will be bringing this as an early draft proposal to the TC39 tools and transpiler outreach group:
0
0
11
@mitsuhiko
Armin Ronacher
1 year
There is also more background information on the personal blog of Arpad:
0
0
7
@TedMielczarek
Ted Mielczarek πŸ€
1 year
@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!
1
1
1
@mitsuhiko
Armin Ronacher
1 year
@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.
0
0
2
@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.
1
0
0
@mitsuhiko
Armin Ronacher
1 year
@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).
1
0
0
@robknight_
Robert Knight
1 year
@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.
0
0
2