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

Uglify settings break library code #136

Closed
dignifiedquire opened this issue Jun 24, 2017 · 3 comments
Closed

Uglify settings break library code #136

dignifiedquire opened this issue Jun 24, 2017 · 3 comments

Comments

@dignifiedquire
Copy link
Contributor

I have some crypto library code that when I include it breaks due to the very agressive uglify settings here: https://github.com/developit/preact-cli/blob/master/src/lib/webpack-config.js#L405

Once I remove the unsafe_comps and unsafe options everything works fine. I know it's nice to get smaller code but maybe it would be good to disable unsafe options by default as I suspect that there are quite a few libraries out there that will break due to these optimisations. And this is especially hard to catch as tests usually run against dev builds and not against production builds.

#56 would allow me to workaround it, but I still feel that not breaking libraries should be rather the default and unsafe optimisations should be behind a flag.

@developit
Copy link
Member

I think we could remove those, they are unlikely having too much effect.

@lukeed
Copy link
Member

lukeed commented Jun 27, 2017

Yeah, we can remove. But going forward, #56 should be the way to handle this or any custom settings.

dignifiedquire added a commit to dignifiedquire/preact-cli that referenced this issue Jun 27, 2017
@dignifiedquire
Copy link
Contributor Author

Fixed in #144

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

4 participants