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 seems the () of a function iife expression will always be stripped when there's leading /* @__PURE__ */ and being used as value, idk. The code will be invalid when it is after export default.
Thanks for the report. This is a bug in esbuild. I will fix this in the next release. In the meantime, you should be able to work around this by changing export default ... into let someVar = ... followed by export { someVar as default }.
Activity
dongj0316 commentedon Apr 22, 2022
System info:
hyrious commentedon Apr 22, 2022
It seems the
()
of a function iife expression will always be stripped when there's leading/* @__PURE__ */
and being used as value, idk. The code will be invalid when it is afterexport default
.See it online.
This problem only happens in transform mode, since in build mode the default export will be transformed to
export { default_export as default }
.dongj0316 commentedon Apr 22, 2022
@hyrious Yes, this is a syntax error
'uncaught syntax error: unexpected token ')'
evanw commentedon Apr 22, 2022
Thanks for the report. This is a bug in esbuild. I will fix this in the next release. In the meantime, you should be able to work around this by changing
export default ...
intolet someVar = ...
followed byexport { someVar as default }
.