-> 0.5: Only create sourcemaps for concatenation, add tests, etc#8
-> 0.5: Only create sourcemaps for concatenation, add tests, etc#8Rich-Harris wants to merge 6 commits intomasterfrom
Conversation
|
Ha, I've just seen all the other open PRs. D'oh, sorry. Will take another look at all this in the morning... |
|
@Rich-Harris Yeah, please have a look at #6 and #7. I've had similar problems with inlined base64 sourcemaps.
Yeah, in theory. :-( :-( In practice, I run into problems with unresolved file paths which are symlinks, which has led me to create rollup/rollup#627 and gobblejs/gobble-unpackage@4c675fa. Unfortunately I have found that it's way more reliable if gobble transformers handle sourcemaps properly by themselves. Please do try out #7, let me know what you think. Oh, and sandermatch too, gobble plugins use the same repeated sander+minimatch pattern way too often. |
|
Any chance #7 or similar could be merged sometime? Just ran into Rich-Harris/sorcery#68, tried upgrading to gobble-concat ^0.4 to fix it, and ran into the data-UR-sourcemap issue instead 😉 |
@IvanSanchez I started looking into Rich-Harris/sorcery#68 and ended up in a bit of a rabbit hole – bear with me:
AFAICT, as of #1 gobble-concat processes the sourcemaps of its sources – is that right? When I tried to build Leaflet.VectorGrid, it fell apart because one of the sources had an inline data URI for the sourceMappingURL, which wasn't expected.
Anyway, processing incoming sourcemaps is a bit unusual – in theory a transformer should only worry about creating a sourcemap for its own transformation, and let Gobble flatten everything as a final step. To that end, this PR reverts 1aaa1f6 and generates fresh sourcemaps for all
.jsand.cssfiles (unlessoptions.sourceMap === false), ignoring existing sourcemaps other than to remove thesourceMappingURLcomments.It does a couple of other things besides (I should have been a bit more disciplined and done this as several PRs, but like I said, rabbit hole...) – it adds some tests and a build process.
What do you reckon?