# Using async functions and generators with StealJS

**URL:** <https://forums.bitovi.com/t/using-async-functions-and-generators-with-stealjs/966>\
**Category:** StealJS\
**Created:** [September 19, 2018, 5:13pm UTC](https://forums.bitovi.com/t/using-async-functions-and-generators-with-stealjs/966 "2018-09-19T17:13:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![imaustink](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/imaustink/32/272_2.png) [@imaustink](https://forums.bitovi.com/u/imaustink)\
**Post date:** [September 19, 2018, 5:13pm UTC](https://forums.bitovi.com/t/using-async-functions-and-generators-with-stealjs/966/1 "2018-09-19T17:13:58Z")

</div>

When attempting to use async functions in my DoneJS project, the production build was throwing `TypeError: define is not a function` after importing `babel-polyfill`.

The configuration outlined here solved my problem: [https://stealjs.com/docs/config.babelOptions.html#generators](https://stealjs.com/docs/config.babelOptions.html#generators)

---

<div class="post-metadata">

**Author:** ![phillipskevin](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/phillipskevin/32/102_2.png) [@phillipskevin](https://forums.bitovi.com/u/phillipskevin)\
**Post date:** [September 19, 2018, 8:46pm UTC](https://forums.bitovi.com/t/using-async-functions-and-generators-with-stealjs/966/2 "2018-09-19T20:46:30Z")

</div>

Thanks for posting, @imaustink!
