-
-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why minify packages for node? #1114
Comments
The code is minified to reduce its footprint when being used in other packages. To aid in debugging, you could always just use the source and npm link it locally. |
I don't think most other projects go full minimized source. If footprint size is a concern there are fairly easy options for shipping projects to minimize things to their own specifications. Needing to pull the source and link isn't a great option. |
Thats fair, what would you two suggest? |
I did some searching this morning to see how other projects handle it and the answer seems to be "it's complicated". There's a good discussion over here but no real resolution (googleapis/google-cloud-node#2867). I think the thing that would have helped me the most is just not minimizing the source. That would let me do basic things like use a debugger and step through calls to see what's happening. |
Hmm, what if i just minified the browser version? I feel like the browser files are the ones most affected by package size. |
Or i could include the source maps |
If you're going to minify a version doing that just for the browser makes sense. But in a world where many projects make use of tools like webpack to assemble their final bundle you may not need to worry about minification. The only place where I think you would want that is if you were distributing the library via a CDN for simple script tag inclusion but I don't see that mentioned in the docs anywhere. |
Ive removed the minification in the latest builds for everything besides the browser release 🚀 |
Description
I'm trying to debug custom requester and I see such useless backtraces:
I can install your project, million of its dependencies and try to dive deeper into the error, but actually I should see the real backtrace and find out where is error comes from without any additional steps.
Proposal
Modules should not be minified and should represent original sources.
The text was updated successfully, but these errors were encountered: