protobuf-javascript
protobuf-javascript copied to clipboard
Generate ES6-style code (classes, exports, imports)
There is a long-standing request for ES6 module generation: https://github.com/protocolbuffers/protobuf-javascript/issues/75. This PR mostly adds such support, though it needs to be cleaned up, fixed and tested.
The code generator should still produce the same output for previously supported inputs. The es6 option changes the output style significantly.
This is awesome!
Any update?
The branch works and has been updated with many fixes. We use it in web apps at work. However, last I checked, it will not be accepted upstream because the change is so large.
Shameless plug, you might be interested in checking out protobuf-es: https://github.com/bufbuild/protobuf-es
It fully supports TypeScript and ESM and is completely conformant and compatible with the Protobuf format.
Guys, can you make this thing moving forward? I would really like to have ESM module instead of CJS modules.
In my fork I have been maintaining and improving the ES6 support. I don't think the maintainers of the main repo have enough time to review the change and get it into shape to submit.
On Tue, Aug 27, 2024, 8:23 AM Stanislav Berkov @.***> wrote:
Guys, can you make this thing moving forward? I would really like to have ESM module instead of CJS modules.
— Reply to this email directly, view it on GitHub https://github.com/protocolbuffers/protobuf-javascript/pull/156#issuecomment-2312866811, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAUO5Y4AHQE6IAGDHZTMBDZTSKVTAVCNFSM6AAAAAAST6WIB2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJSHA3DMOBRGE . You are receiving this because you authored the thread.Message ID: @.***>