Rich-Harris / magic-string

Manipulate strings like a wizard
MIT License
2.34k stars 113 forks source link

perf: skip line break mappings #284

Closed sapphi-red closed 1 week ago

sapphi-red commented 1 week ago

This PR removes line break mappings from the output sourcemap and reduces the output sourcemap. visualizer before visualizer after

esbuild does not output them and probably fine to skip them. example repl visualizer for that

antfu commented 1 week ago

Would you consider this safe to ship in a patch? I don't know if any consumer would rely on that information.

sapphi-red commented 1 week ago

I guess no one would rely on this information but I'm not sure.

antfu commented 1 week ago

Ok, let's try it. If there are any cases I'd revert it and move to a minor then. Thanks!