dowjones / gulp-bundle-assets

Create static asset (js, css) bundles from a config file: a common interface to combining, minifying, revisioning and more
MIT License
133 stars 36 forks source link

optionally disable sourcemaps #27

Closed chmontgomery closed 9 years ago

chmontgomery commented 10 years ago

Sometimes the sourcemaps are unnecessary or could cause potential problems. Add a flag to optionally disable them.

adamrights commented 10 years ago

I can see this as useful but a small point. So I first realized I like turning source maps off when profiling the network for load -- as every time you open dev tools it calls the maps. But, one can easily disable in chrome tools source maps, which is what I do when I'm doing the type of profiling that makes them a nuisance.

The other reason then to turn off the source maps would fall under "production hardening". Tasks like removing console.log() calls, comments you don't want in prod, references to development source maps, etc.

That's where this task falls under. And this is not to argue it shouldn't be an option -- just that the default for a project really should be source maps on -- devs not needing them should turn them off in dev tools, and only in the production build/uglifying should the assets if desired not have the reference.

chmontgomery commented 10 years ago

Agreed. The real driving force behind this feature was the possibility of bugs in other 3rd party gulp plugins outside my control that could throw errors when attempting to interact with gulp-sourcemaps. I already fixed one issue related to this. If someone really wanted to use a custom transform but it broke the pipe due to sourcemaps and they didn't care about sourcemaps, which is arguably an insignificant feature, I didn't want that to be a blocker causing them to not use this library at all.

basketofsoftkittens commented 10 years ago

+1

chmontgomery commented 9 years ago

released in v2.18.0