I was only using Protobuf in the browser for a prototyping tool so I wasn't worried about size of performance.
This is what I ended up doing, in case someone else needs to do the same.
This was based on Ned's response above.
Red text is based on your environment and will be different.
c15985d76a6b was my docker image ID yours will be different.
~/user/BOB will be different, that is the directory you are in.
These commands should only need to be performed once:
# to get google-protobuf.js
#
docker run -v $(pwd):$(pwd) -w $(pwd) node yarn add google-protobuf
# create a link to the required file (you could copy it instead)
#
ln -s ./node_modules/google-protobuf/google-protobuf.js google-protobuf.js
# pulled node/browserify docker container
#
docker pull tjaart/browserify-docker
# run bash in the container image and install browserify
#
docker run -it -v $(pwd):$(pwd) -w $(pwd) c15985d76a6b /bin/bash
root@98a84580ee6b:~/user/BOB# npm install -g browserify
root@98a84580ee6b:~/user/BOB# browserify --version
16.5.1
root@98a84580ee6b:~/user/BOB# exit
That's the environment set up.
As I modified my Protobuf definition during development I would run the following two commands to rebuild.
Note fcefaeaf5bdf was my docker image ID yours will be different.
docker run --rm --user "$(id -u):$(id -g)" -v $(pwd):$(pwd) -w $(pwd) gwihlidal/protoc --js_out=import_style=commonjs,binary:. -I. ./my.proto
docker run -it -v $(pwd):$(pwd) -w $(pwd) fcefaeaf5bdf browserify my_pb.js > my_combined.js
The file my_combined.js is what you need to use in your HTML.
<script src="my_combined.js" type="text/javascript"></script>
You do not need to include my_pb.js because that's all wrapped up inside my_combined.js.
I hope that helps someone.
Cheers