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

Does grunt-contrib-uglify alter my uglify options ? #520

Open
pancakeslp opened this issue Apr 27, 2018 · 2 comments
Open

Does grunt-contrib-uglify alter my uglify options ? #520

pancakeslp opened this issue Apr 27, 2018 · 2 comments

Comments

@pancakeslp
Copy link

Hi,

I originally came because I had an issue with some uglified output in safari (for backstory its something similar to mishoo/UglifyJS#1753 but not directly related), but am now confused about how uglify options are passed to uglifyJs

After a bit of trying to configure uglify in Gruntfile.js (because I wanted to pass the safari10 flag to uglifyJs), i gave up and decided to see what happens when i call uglifyJs directly without grunt-contrib-uglify
In my original Gruntfile I was asking for compress and mangle, so when i cam to call uglifyJs directly I asked for compress and mangle, expecting to see my bug replicated.
However I was surprised to see that my uglified code was then working on safari.

So I was wondering does grunt-contrib-uglify do anything under the covers to manipulate the options passed to uglifyJs ? I've had a look myself but with little success
Or is there some logging that can be turned on to check what grunt-contrib-uglify is calling uglifyJs with ?

@phoenixdev-kl
Copy link

phoenixdev-kl commented Feb 14, 2022

Hi pancakeslp, I seem to have a similar problem, my mangle options are suddenly ignored after updating from grunt-contrib-uglify 4 to 5. But relating to your question, there is a "--verbose" parameter you can add, and at some point you will then see the options which grunt will pass to uglifyJs. But I doubt that it's helpful because in my case I see the (correct) mangle option in the verbose output ... though it's not working. So I guess I will downgrade back to 4 :'(

Update: Sorry, the issue seems to not be related to updating grunt-contrib-uglify.

@Felipe6Connex
Copy link

I'm having an issue also with safari, when I use grunt-contrib-uglify-es (deprecated) it works fine, but when I use grunt-contrib-uglify the functionality breaks, more precise when trying to pass parameters to an async function using the Function.prototype.apply() method.

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

3 participants