libjass icon indicating copy to clipboard operation
libjass copied to clipboard

Current build breaks sourcemaps in older browsers

Open kayone opened this issue 9 years ago • 4 comments
trafficstars

right now, the unminified build libjass.js has sourcemap url information at the end of the file,

//# sourceMappingURL=libjass.js.map

This confuses the some old browsers (Samsung Tizen SDK). Inspector will think that's where it should get the sourcemap from and if it fails to load (404) it'll give up on loading anymore sourcemaps for the rest of the app, practically nuking the sourcemaps support.

As far as I can tell there shouldn't be a need for the unminified version of the file to have any sourcemap information included.

kayone avatar Aug 25 '16 18:08 kayone

As far as I can tell there shouldn't be a need for the unminified version of the file to have any sourcemap information included.

The sourcemap maps the JS to the original TS. Same for the minified version.

I personally don't need it; I have no problem debugging JS. But rather than me removing it to cater to a buggy browser, perhaps you could strip it out on your end?

Arnavion avatar Aug 26 '16 17:08 Arnavion

I completely understand, that's what we do right now, however it means we can't use the NPM package anymore.

kayone avatar Aug 26 '16 17:08 kayone

Well I meant something like a build step, but I'll think about it.

Arnavion avatar Aug 26 '16 17:08 Arnavion

yeah, that was our next step, in case another library does something similar.

kayone avatar Aug 26 '16 17:08 kayone