Hi all. We're considering adopting source-map in a project that will be used in browsers, and this chart is giving us pause:
0.7.3: 28.2kb minified, 8.1kb zipped
0.8.0-beta.0: 377.3kb minified, 95kb zipped
This stark difference is entirely accounted for by the addition of whatwg-url as a dependency. It doesn't affect Node at all (which either uses the built in URL object or require("url").URL as appropriate), so this polyfill is for the benefit of browsers that don't support URL, which is basically just IE and Opera Mini.
If this package is intended to be used in browsers, I'd argue that keeping the bundle size small is a worthwhile goal. I see a couple of options:
Expect developers serving legacy browsers to bring their own polyfill
Reimplement the same functionality used by this package in a small utility module
I'd be happy to work on a pull request if you could give me some guidance. Thank you!
Hi all. We're considering adopting source-map in a project that will be used in browsers, and this chart is giving us pause:
This stark difference is entirely accounted for by the addition of whatwg-url as a dependency. It doesn't affect Node at all (which either uses the built in
URL
object orrequire("url").URL
as appropriate), so this polyfill is for the benefit of browsers that don't supportURL
, which is basically just IE and Opera Mini.If this package is intended to be used in browsers, I'd argue that keeping the bundle size small is a worthwhile goal. I see a couple of options:
I'd be happy to work on a pull request if you could give me some guidance. Thank you!