You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful if UglifyJS' warnings took the input source-map into account, even if it's an optional feature.
In my workflow I browserify stuff and then save it to a temp file to run uglifyjs, so personally my warnings look something like this:
WARN: Dropping unused function argument name [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:56,28]
WARN: Dropping unused function argument dir [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:62,26]
WARN: Dropping unused function argument exports [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:1,437]
WARN: Dropping unused function argument deleteCount [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:421,35]
WARN: Dropping unused function argument start [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:421,28]
WARN: Dropping unused function argument key [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:946,44]
WARN: Side effects in initialization of unused variable array_push [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:113,4]
WARN: Dropping unused function argument exports [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:1499,33]
WARN: Dropping unused function argument properties [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:12433,35]
WARN: Dropping unused variable isCurryBound [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:12996,10]
WARN: Dropping unused function argument exports [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:18386,33]
WARN: Dropping unused function argument exports [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:20437,43]
WARN: Dropping unused function argument exports [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:29964,33]
WARN: Dropping unused function argument exports [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:29971,58]
WARN: Dropping unused function argument exports [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:29982,75]
WARN: Dropping unused function argument exports [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:29984,34]
WARN: Dropping unused function argument module [/var/folders/t4/lr96d_b55fd7f5cb1c_60rl80000gn/T/otakucore-source90446dpphde8.js:29984,27]
I give uglifyjs an --in-source-map filled with information on where all the JS I'm minifying, using it to try and resolve the original location would likely lead to much more readable warnings.
Though even without a situation as rare as mine this feature would probably be useful to others since there should be plenty others using things like browserify or coffee-script that compile before uglifying and generate sourcemap.
The text was updated successfully, but these errors were encountered:
This isn't as rare as you might think. ng-packagr is using a similar process and as ng-packagr is now used internally to generate new libraries using @angular/cli, this is probably coming up for quite alot people.
pfeigl
added a commit
to pfeigl/ng-packagr
that referenced
this issue
May 20, 2018
This should help the normal user to identify the bundled source file which originated the warnings.
There is also mishoo/UglifyJS#516 which tracks using the source-maps to
display the correct originating file of the warning.
It would be useful if UglifyJS' warnings took the input source-map into account, even if it's an optional feature.
In my workflow I browserify stuff and then save it to a temp file to run uglifyjs, so personally my warnings look something like this:
I give uglifyjs an --in-source-map filled with information on where all the JS I'm minifying, using it to try and resolve the original location would likely lead to much more readable warnings.
Though even without a situation as rare as mine this feature would probably be useful to others since there should be plenty others using things like browserify or coffee-script that compile before uglifying and generate sourcemap.
The text was updated successfully, but these errors were encountered: