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
I was minifying a project with a package depending on node-bindings and the resulting code ended up throwing an exception regarding some path not being a string.
Most minifiers will remove code with no side effect, just like getting a property of an object while seemingly not having any use for it.
Since I use uglify-es, I'm able to set the pure_getters compress option to false, which instructs the minifier to be extra-conservative regarding object property accesses.
I dunno if this is something you'd like to "fix" but I thought people should know in case they encounter the same issue.
The text was updated successfully, but these errors were encountered:
I was minifying a project with a package depending on node-bindings and the resulting code ended up throwing an exception regarding some path not being a string.
Most minifiers will remove code with no side effect, just like getting a property of an object while seemingly not having any use for it.
Since I use uglify-es, I'm able to set the pure_getters compress option to false, which instructs the minifier to be extra-conservative regarding object property accesses.
I dunno if this is something you'd like to "fix" but I thought people should know in case they encounter the same issue.
thank you for this , this problem Trouble me whole week!
I was minifying a project with a package depending on
node-bindings
and the resulting code ended up throwing an exception regarding somepath
not being astring
.I pinpointed the problem in
getRoot
which led to the realization thatgetFileName
was returningundefined
. Finally, I spotted the culprit:dummy.stack
(https://github.com/TooTallNate/node-bindings/blob/master/bindings.js#L168).Most minifiers will remove code with no side effect, just like getting a property of an object while seemingly not having any use for it.
Since I use
uglify-es
, I'm able to set thepure_getters
compress option tofalse
, which instructs the minifier to be extra-conservative regarding object property accesses.I dunno if this is something you'd like to "fix" but I thought people should know in case they encounter the same issue.
The text was updated successfully, but these errors were encountered: