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

Add CommonJS Build #153

Open
JaneX8 opened this issue Feb 14, 2023 · 1 comment
Open

Add CommonJS Build #153

JaneX8 opened this issue Feb 14, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@JaneX8
Copy link

JaneX8 commented Feb 14, 2023

Feature Request: Add CommonJS Build

Describe the problem

The current build of the library only supports ECMAScript (ES) module format, which makes it difficult for developers who use CommonJS in their projects to use this library.

Describe the solution you'd like

I would like to request the addition of a CommonJS build to the library. This will allow developers who use CommonJS to easily use this library in their projects.

Describe alternatives you've considered

One alternative solution would be to manually transpile the library using Babel or a similar tool. However, this can be time-consuming and error-prone. Having a CommonJS build as part of the library will make it easier and more convenient for developers to use it.

Additional context

I'm trying to use this in a serverless function on a platform that only supports CommonJS for the moment. Making this library unfortunately not easily usable at the moment.

Related: https://stackoverflow.com/a/63121798/4820655

@JaneX8 JaneX8 added the enhancement New feature or request label Feb 14, 2023
@gnarea
Copy link
Member

gnarea commented Feb 15, 2023

Hi again @JaneX8! Agreed, we should support CommonJS.

I tried to when I first started working on this library, but gave up as I couldn't get the two working and I couldn't think of any reason why we'd want to support CommonJS going forward, but yours is a good reason.

I'd welcome a PR for this if you want to tackle this. A few relevant pointers:

@gnarea gnarea added the good first issue Good for newcomers label Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants