protocolbuffers / protobuf-javascript

BSD 3-Clause "New" or "Revised" License
351 stars 67 forks source link

Allow for custom npm packages in imported protos #165

Open jasonbrown-alis opened 1 year ago

jasonbrown-alis commented 1 year ago

Here is a link to the line where it speaks to our issue. https://github.com/protocolbuffers/protobuf-javascript/blob/6113588085fea6149c51a750bd21b5cf9334a07d/generator/js_generator.cc#L116-L119

We currently make use of a variety of google protos other than those in the google-protobuf npm package. To make use of these, we have to explicitly include them in the npm package that we publish containing our generated protobufs. It would be ideal if we could publish the generated google protobufs we use in a separate npm package and use options in the .proto files to specify the name of the package to which these are published, and for this package to be used in the generated code whenever one of these protobufs is implemeneted. Similar to how this is for the "google-protobuf" imports

dibenede commented 1 year ago

From triage: We should consider doing this to make things easier for folks.