1- load ("@build_stack_rules_proto//rules/ts:proto_ts_library.bzl" , "proto_ts_library" )
21load ("@rules_proto//proto:defs.bzl" , "proto_library" )
32load ("@build_stack_rules_proto//rules/cc:grpc_cc_library.bzl" , "grpc_cc_library" )
43load ("@build_stack_rules_proto//rules/cc:proto_cc_library.bzl" , "proto_cc_library" )
@@ -8,10 +7,12 @@ load("@build_stack_rules_proto//rules/go:proto_go_library.bzl", "proto_go_librar
87load ("@build_stack_rules_proto//rules/java:grpc_java_library.bzl" , "grpc_java_library" )
98load ("@build_stack_rules_proto//rules/java:proto_java_library.bzl" , "proto_java_library" )
109load ("@build_stack_rules_proto//rules/nodejs:grpc_nodejs_library.bzl" , "grpc_nodejs_library" )
10+ load ("@build_stack_rules_proto//rules/nodejs:grpc_web_js_library.bzl" , "grpc_web_js_library" )
1111load ("@build_stack_rules_proto//rules/nodejs:proto_nodejs_library.bzl" , "proto_nodejs_library" )
1212load ("@build_stack_rules_proto//rules/py:grpc_py_library.bzl" , "grpc_py_library" )
1313load ("@build_stack_rules_proto//rules/py:proto_py_library.bzl" , "proto_py_library" )
1414load ("@build_stack_rules_proto//rules/scala:grpc_scala_library.bzl" , "grpc_scala_library" )
15+ load ("@build_stack_rules_proto//rules/ts:proto_ts_library.bzl" , "proto_ts_library" )
1516load ("@build_stack_rules_proto//rules:proto_compile.bzl" , "proto_compile" )
1617
1718# gazelle:proto_plugin ts_proto option nestJs=true
@@ -192,19 +193,32 @@ grpc_nodejs_library(
192193 deps = [":routeguide_nodejs_library" ],
193194)
194195
196+ grpc_web_js_library (
197+ name = "routeguide_grpc_web_js_library" ,
198+ srcs = ["routeguide_grpc_web_pb.js" ],
199+ visibility = ["//visibility:public" ],
200+ deps = [":routeguide_nodejs_library" ],
201+ )
202+
195203proto_compile (
196204 name = "routeguide_node_js_compile" ,
197205 options = {
198206 "@build_stack_rules_proto//plugin/builtin:commonjs" : ["import_style=commonjs" ],
199207 "@build_stack_rules_proto//plugin/grpc/grpc-node:protoc-gen-grpc-node" : ["grpc_js" ],
208+ "@build_stack_rules_proto//plugin/grpc/grpc-web:protoc-gen-grpc-web" : [
209+ "import_style=commonjs+dts" ,
210+ "mode=grpcwebtext" ,
211+ ],
200212 },
201213 outputs = [
202214 "routeguide_grpc_pb.js" ,
215+ "routeguide_grpc_web_pb.js" ,
203216 "routeguide_pb.js" ,
204217 ],
205218 plugins = [
206219 "@build_stack_rules_proto//plugin/builtin:commonjs" ,
207220 "@build_stack_rules_proto//plugin/grpc/grpc-node:protoc-gen-grpc-node" ,
221+ "@build_stack_rules_proto//plugin/grpc/grpc-web:protoc-gen-grpc-web" ,
208222 ],
209223 proto = "routeguide_proto" ,
210224)
0 commit comments