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
In the source, the function is named foo and inspecting its .name gives foo.
However terser mistakenly renames the function to bar which can be observed with .name.
In the screenshot I run the before minified and after minified and you can see in the console what console.log()ing the .name gives.
the source is
letfoo=()=>{}letbar=fooconsole.log(bar.name)
The text was updated successfully, but these errors were encountered:
The circumstances where .name is assigned are statically analyzable (we can list the circumstances by searching for references to NamedEvaluation in the spec) so this is something that can be done.
We can for instance suppress the analysis of variable definitions that hold anonymous functions here. This approach is simple but it may have drawbacks (IE we can't inline functions into callsites now).
In the source, the function is named
foo
and inspecting its.name
givesfoo
.However terser mistakenly renames the function to
bar
which can be observed with.name
.In the screenshot I run the before minified and after minified and you can see in the console what
console.log()
ing the.name
gives.the source is
The text was updated successfully, but these errors were encountered: