Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESM/browser support #45

Open
felixfbecker opened this issue Nov 3, 2020 · 2 comments
Open

ESM/browser support #45

felixfbecker opened this issue Nov 3, 2020 · 2 comments

Comments

@felixfbecker
Copy link

I'd love to use this package in the browser, but currently it uses Node-style CommonJS. Would it be possible to support ESM through package.json fields?

@dougwilson
Copy link
Contributor

I am fine to add more platforms than Node.js if that does not end up forking the code too much. If someone would like to put a pull request together that adds said support and includes the appropriate tests that back up whatever the platform is in the CI. It sounds like you said web browser, so we'd want to make sure some kind of web browser test matrix is added to the CI with it.

@KostyaTretyak
Copy link

@felixfbecker, try @ts-stack/type-is. This is a fork of type-is, but this one accepts headers instead of a request object. Writen in TypeScript in format ESM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants