protobuf.js icon indicating copy to clipboard operation
protobuf.js copied to clipboard

pbjs: Support generating one .js file per .proto file

Open dandean opened this issue 7 years ago • 12 comments

I have a shared library of .proto files. I'd like to be able to publish it as an npm module consisting of one .js file per .proto file. This will enable any consumer of the module to import only what they need, and so have a smaller bundle size which is specific to the application.

Is this possible with pbjs?

dandean avatar Mar 24 '17 00:03 dandean

Unfortunately, pbjs isn't able to output multiple files, yet, but this is still something I want to do.

dcodeIO avatar Mar 24 '17 00:03 dcodeIO

Ah, dang. Thanks for the response, and I appreciate all of the work on this library.

dandean avatar Mar 24 '17 17:03 dandean

If you don't mind, I'd like to keep this issue open as a reminder and to track eventual progress.

dcodeIO avatar Mar 24 '17 17:03 dcodeIO

Out of curiosity, what code changes are required to implement this feature?

adam-26 avatar Jul 23 '17 21:07 adam-26

Has there been any advancement on this front?

ClemannD avatar May 24 '19 13:05 ClemannD

+1

natiz avatar Nov 10 '19 14:11 natiz

+1

bnerDY avatar Dec 27 '19 06:12 bnerDY

+1

CarsonMcKinstry avatar Jan 22 '20 08:01 CarsonMcKinstry

Thanks for your great work. I wonder if still has any plan on this feature?

create-share avatar Feb 10 '20 07:02 create-share

For comparison, this feature is supported by Google's protoc.

pauldraper avatar Nov 12 '20 01:11 pauldraper

How is this going?

nicolasalt avatar Jun 25 '23 20:06 nicolasalt

I'm using ts-proto to do this now. Highly recommended.

paralin avatar Jun 25 '23 21:06 paralin