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 found that using KeepNames will add a def function (__name) at the begin. When the module uses .toString() to get a function's source code and use it to execute (new Function / new Worker). The def function will be out of the scope.
I found that using
KeepNames
will add a def function (__name
) at the begin. When the module uses.toString()
to get a function's source code and use it to execute (new Function
/new Worker
). The def function will be out of the scope.An original module below
will be transformed to
Now
main
needs__name
when it is executed. However there no definition inmain.toString()
.canvas-confetti is a real package with the edge case.
After enabling
useWorker
:Here's a simple demo: https://gist.github.com/alienzhou/75e1f1a4c7fdbbf7cabce4469688df1b#file-esm-sh-simple-example-html
(works well in v82 and is broken in v83)
It's more like a problem of esbuild. Maybe adding an option for users?
The text was updated successfully, but these errors were encountered: