danvk / source-map-explorer

Analyze and debug space usage through source maps
Apache License 2.0
3.84k stars 101 forks source link

support .sourcemap files as well #240

Open paulirish opened 2 years ago

paulirish commented 2 years ago

I work with a few projects that use a toolchain that creates file.js and file.js.sourcemap.
in s-m-e, all the convention is for *.js.map so this adds in support for the longer filename extension.

To add a proper test, I didn't see another way than to add two more test assets into test/data/. That felt kinda wasteful, but I'll leave it up to the reviewer. I added the test in https://github.com/danvk/source-map-explorer/commit/7f1661e8217610b1eb98443d121e57d61abb87f4 (and then reverted it). Happy to bring back if you'd prefer the converage.