Closed maxinteger closed 3 years ago
If the class has an async arrow function propery, the lib generate invalid code.
For example:
export default class Test2 extends React.Component { fn = async () => { return await new Promise((res) => res(1)) }; }
generate the fallowing error:
Module parse failed: The keyword 'yield' is reserved (68:15) You may need an appropriate loader to handle this file type. | Test2.prototype._hmr_fn = function () { > return yield new Promise(function (res) { return res(1); }); | };
PR: #9
Oh good catch.
Fixed
If the class has an async arrow function propery, the lib generate invalid code.
For example:
generate the fallowing error: