-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
--source-map, --source-map-root, --source-map-url, --source-map-include-sources, --in-source-map ... come on, I just want my friggin’ source map! ;)
Why not simplify it?
- Have a
--mapoption to toggle source map generation. - Always call it
<outputfile>.mapand put it next to the output file. (Write it to stderr if writing the output to stdoutuglifyjs ... > out.js 2> out.js.map). I don’t see any reason at all to put it anywhere else. - Always add sourceContent for every source file. This way you don’t need to worry about hosting the exact version of the source code that produced the generated code. (Host your repo instead.)
- Never set
sourceRoot. We don’t need to if all sources are inlined into the map. - Look for sourceMappingURLs in each source file, and apply those source maps automatically.
This makes it super simple, and really nice—both in development and in production.
brunch works like this. I haven’t seen a single request there about generating different source maps.
Is this just me (and the brunch community), or am I missing something?
Reactions are currently unavailable