Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with form-data not importing correctly for ESM projects (#523)
The npm package `form-data` has an issue with importing compatibility between CJS and ESM. Using `import * as FormData` or `import FormData` works only on cjs while `import { default as FormData }` works only on esm. We work around this now by checking if `default` exists on the importing object, and using it if it does, otherwise just use `FormData`.
- Loading branch information