grpc / grpc-web

gRPC for Web Clients
https://grpc.io
Apache License 2.0
8.51k stars 766 forks source link

How does this library relate to Protoc, and protoc support for ES6 can be requested here? #1244

Open yl-yue opened 2 years ago

yl-yue commented 2 years ago

How does this library relate to Protoc, and protoc support for ES6 can be requested here?

sampajano commented 2 years ago

Hi :)

This library provides an extension to protoc for auto-generating the API stubs.

The protoc for JS proto messages has been recently moved to this location: https://github.com/protocolbuffers/protobuf-javascript

I'm supposing you could submit your FR over there.

Thanks! :)

yl-yue commented 2 years ago

Thanks for the reply, looking forward to using ES6 import in grpc-web

Due to the current vue2 upgrade to vue3, and the selection of UI framework must use ES6 specification, resulting in the current temporary abandoned grpc-web, using GRPC gateway to JSON request, currently launched in the browser is HTTP1.1 JSON request, rather than GRPC protocol Protobuf serialization

Therefore, we would prefer to use grpc-web to serialize GRPC requests with Protobuf rather than go back to the original HTTP + JSON approach.