You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.
This is a bit unexpected, because I think this module is primarily targeted at NodeJS environments, and the docs don't mention it.
I would suggest using regular CommonJS exports in the source code, to make sure the exported dist/index.js file looks like this:
module.exports=callbackToAsyncIterator
This will probably not make any differences for people using it in a ES6 module environment, because tools like Babel or Webpack usually interop quite nicely with CommonJS modules.
What are your thoughts on this? I can work on a PR if that sounds good
The text was updated successfully, but these errors were encountered:
WaldoJeffers
changed the title
[SUGGESTION] Use standard a CommonJS export
[SUGGESTION] Use a standard CommonJS export
Aug 11, 2019
Currently,
callback-to-async-iterator
is written using ES6 modules, and transpiled to CommonJS using babel-plugin-transform-modules-commonjs.The export in the result file in the
dist
folder looks like this:which means in a standard CommonJS environment, you have to write something like this to use it:
This is a bit unexpected, because I think this module is primarily targeted at NodeJS environments, and the docs don't mention it.
I would suggest using regular CommonJS exports in the source code, to make sure the exported
dist/index.js
file looks like this:This will probably not make any differences for people using it in a ES6 module environment, because tools like Babel or Webpack usually interop quite nicely with CommonJS modules.
What are your thoughts on this? I can work on a PR if that sounds good
The text was updated successfully, but these errors were encountered: