How to make protobufjs generated code smaller

347 Views Asked by At

protobufjs generated code is too large for front end cases in mobile cases. There is about 300kb while using 3 short proto files.

Bash for generating es6:

pbjs -t static-module -w es6 -o proto.js titan.proto --no-convert --no-delimited --no-comments
1

There are 1 best solutions below

0
D.H.Lolo On

Finally I found a tool based on protobufjs Expansion mechanism:https://github.com/mustime/minipbjs