Skip to content
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

Don't minimise npm package? #30

Closed
mmkal opened this issue May 18, 2024 · 1 comment
Closed

Don't minimise npm package? #30

mmkal opened this issue May 18, 2024 · 1 comment

Comments

@mmkal
Copy link

mmkal commented May 18, 2024

Feature request

It would be nice to publish cleye without minimised javascript

Why?

Being minimised makes it very hard to debug things, here's the error I'm currently looking at (note, this issue isn't about the error, I'm playing around and no doubt did something wrong, it's more about how hard it is to find out what I did wrong):

image

(Another alternative: have really really bulletproof input validation, so end-users like me never see this kind of error, but I don't think that's easily achievable)

Alternatives

Publish source maps, and the original typescript too, so users can use a library like source-map-support to get a more human readable stack trace.

Additional context

I don't think there's much value in minimising, especially since this is a CLI library, not a browser library. The rare people who want minimised code can always use their own minimiser.

@privatenumber
Copy link
Owner

Maybe I'll write a blog post on why I minify my packages one day.

But if you want to debug cleye, you can run prettier on it.

If the error message is not ideal, that's Node.js printing it so I think there should be a feature request to better handle error stacks in minified/dense code.

@privatenumber privatenumber closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants