diff --git a/grpc/tasks.py b/grpc/tasks.py index 69a1c4b..8ac66aa 100644 --- a/grpc/tasks.py +++ b/grpc/tasks.py @@ -37,7 +37,10 @@ def gen(c, target="types"): if target == "ts": plugin_path = npmbin_path / ("protoc-gen-ts_proto" + (".cmd" if platform.system() == "Windows" else "")) - cmd = "protoc --plugin=protoc-gen-ts_proto={} --ts_proto_opt=outputServices=grpc-js --ts_proto_out={} -I pb {}".format( + cmd = "protoc --plugin=protoc-gen-ts_proto={} " \ + "--ts_proto_opt=outputServices=grpc-js " \ + "--ts_proto_opt=esModuleInterop=true " \ + "--ts_proto_out={} -I pb {}".format( plugin_path, out_dir, "./pb/bdware/bdledger/api/*.proto") print(cmd) c.run(cmd)