ForbesLindesay / browserify-middleware

express middleware for browserify, done right
http://browserify.org
MIT License
381 stars 66 forks source link

options.minify and options.debug are not mutually exclusive #25

Closed duereg closed 10 years ago

duereg commented 10 years ago

It would be great if you turned on both minify and debug options, that you outputted minified code with source maps.

ForbesLindesay commented 10 years ago

It would be pointless. Central to this library is that it only returns one file. In debug mode, the source maps are in-lined. We could include them in the minified files, but then the minified files will be huge. If you wanted to do this, it could probably be done as an entirely separate module to serve up the source maps. If that existed, I'd be happy to work with you to make sure this module was compatible.

Does that seem like a reasonable resolution? I don't see a lot of point in minifying the JavaScript only to whack a multi-megabyte comment at the bottom.

duereg commented 10 years ago

Your reasoning makes sense. I'm not sure what direction I want to go with this. If I decide to make a separate module to serve source maps, I'll be sure to consult with you on the direction so it works with your module.