octet-stream / form-data

Spec-compliant FormData implementation for Node.js
https://www.npmjs.com/package/formdata-node
MIT License
142 stars 17 forks source link

Allow use of require() without .default #6

Closed olistic closed 5 years ago

olistic commented 5 years ago

Please consider adding babel-plugin-add-module-exports so this package can be used like this:

require('formdata-node')

Instead of:

require('formdata-node').default
octet-stream commented 5 years ago

Sounds good to me. I will take a look as soon as I can. Thank you for proposing this :)

olistic commented 5 years ago

You know what? Let me send a PR your way!

octet-stream commented 5 years ago

Sure, if you want to. I guess you need to add this plugin here https://github.com/octet-stream/form-data/blob/a663fd21f3c13a600186e6c4d742404cc5f46ccd/.babelrc.js#L14

But please don't bump Babel to latest version since it break async generators somehow (I think it happens because of Symbol.asyncIterator does not exists there anymore). Thank you.