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
{{ message }}
Repository navigation
ReferenceError: _asyncToGenerator2 is not defined #75
Do you have any repro? I guess _asyncToGenerator2 is generated code by Babel not serialize-javascript. The serialize-javascript supports async functions as follows.
serialize-javascript emits async functions exactly as their source is written, and async functions and arrows round-trip correctly. The _asyncToGenerator2 reference comes from Babel's transpiled output, whose helper isn't available where the string is evaluated. Configure Babel not to transpile async functions in that code. Closing.
Activity
okuryu commentedon Mar 5, 2020
Do you have any repro? I guess
_asyncToGenerator2is generated code by Babel notserialize-javascript. Theserialize-javascriptsupportsasyncfunctions as follows.redonkulus commentedon Oct 22, 2026
serialize-javascript emits async functions exactly as their source is written, and
asyncfunctions and arrows round-trip correctly. The_asyncToGenerator2reference comes from Babel's transpiled output, whose helper isn't available where the string is evaluated. Configure Babel not to transpile async functions in that code. Closing.