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
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.
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:
Packages like relaynet-core-js don't actually support ESM because the package.json file lacks the appropriate changes. This is the part I never managed to get to work: For some reason, I always end up with a config that supports either CJS or ESM, but not both. I'm sure I'm doing something wrong, but I don't know what exactly.
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
The text was updated successfully, but these errors were encountered: