We are using the ‘async’ keyword on the lifecycle method ‘componentWillLoad’ that ensures that a fetch API call is completed before the ‘Render’ method is called. This however has issues when packaged and used on an Angular/React app and the eror is as shown below -
Identifier ‘__awaiter’ has already been
Seems like a linter error as we see the hint below -
To ignore add //eslint-disable-next-line to line bore.
However the above is auto generated by stencil as the error is thrown on the js file ./node_modules/[componentname]/dist/esm-es5/.entry.js
No error should be thrown while using the ‘async’ keyword.
Steps to reproduce:
Simply convert the ‘componentWillLoad’ method to async, package it and use it on another project like react/angular.