I'm working on a library that utilizes async/await feature with babel. When I was working on the library I noticed when I setup the production settings for the output that the development environment works great, but as soon as I switch to production it fails. I've tried lost of different transform combinations to try to get it working switching from transform-async-to-generator to async-to-promises but to no avail. I'm not sure but I think it could be something I may be doing wrong with runtimeHelpers, the reason why I turn them on is because If they are not included I get an error when the library is required in an application saying the regeneratorRuntime is undefined.
Error transforming /Users/kennetpostigo/Projects/greed/packages/greed/src/greed.js with 'babel' plugin: An unexpected situation arose. Please raise an issue at https://github.com/rollup/rollup-plugin-babel/issues. Thanks!
Error: Error transforming /Users/kennetpostigo/Projects/greed/packages/greed/src/greed.js with 'babel' plugin: An unexpected situation arose. Please raise an issue at https://github.com/rollup/rollup-plugin-babel/issues. Thanks!
at preflightCheck (/Users/kennetpostigo/Projects/greed/packages/greed/node_modules/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js:50:10)
at Object.transform$1 [as transform] (/Users/kennetpostigo/Projects/greed/packages/greed/node_modules/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js:104:18)
at /Users/kennetpostigo/Projects/greed/packages/greed/node_modules/rollup/src/utils/transform.js:19:35
at process._tickCallback (internal/process/next_tick.js:103:7)
at Module.runMain (module.js:609:11)
at run (bootstrap_node.js:382:7)
at startup (bootstrap_node.js:137:9)
at bootstrap_node.js:497:3
I'm working on a library that utilizes async/await feature with babel. When I was working on the library I noticed when I setup the production settings for the output that the development environment works great, but as soon as I switch to production it fails. I've tried lost of different transform combinations to try to get it working switching from
transform-async-to-generator
toasync-to-promises
but to no avail. I'm not sure but I think it could be something I may be doing wrong with runtimeHelpers, the reason why I turn them on is because If they are not included I get an error when the library is required in an application saying theregeneratorRuntime is undefined
.Here is my
.babelrc
:Here is my is the
rollup.config.js
:The error message: