serialize-javascript icon indicating copy to clipboard operation
serialize-javascript copied to clipboard

ReferenceError: _asyncToGenerator2 is not defined

Open itwhat126 opened this issue 4 years ago • 1 comments

image image before serialize code: image the reason is "async"? how to solve it

itwhat126 avatar Mar 05 '20 01:03 itwhat126

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(async function(){})
'async function(){}'

okuryu avatar Mar 05 '20 11:03 okuryu