-
Notifications
You must be signed in to change notification settings - Fork 15.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Turn on ADVANCED_OPTIMIZATIONS when compiling protobuf JS #5509
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
I signed it! |
CLAs look good, thanks! |
c0c8489
to
2c31a47
Compare
2c31a47
to
fb8c6bf
Compare
|
||
exports.goog = goog; | ||
exports.jspb = jspb; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jspb
is available in the google-protobuf
module. Exporting jspb
here and subsequently using it in test will result in a lot of undefined symbol errors because the compiled google-protobuf
is expecting obfuscated symbols.
@@ -67,7 +67,7 @@ console.log("var global = Function('return this')();"); | |||
console.log("var googleProtobuf = require('google-protobuf');"); | |||
console.log("var testdeps = require('testdeps_commonjs');"); | |||
console.log("global.goog = testdeps.goog;"); | |||
console.log("global.jspb = testdeps.jspb;"); | |||
console.log("global.jspb = googleProtobuf.jspb;"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above. We should use google-protobuf
's jspb
instead of the one we exported for tests.
any updates on this PR? |
We are closing all open JavaScript pull requests because the JavaScript implementation is moving to a new repository: https://github.com/protocolbuffers/protobuf-javascript Sorry for the inconvenience but please feel free to reopen the pull request in the new repo. |
Fixes protocolbuffers/protobuf-javascript#92
After optimization the bundle size went from ~156KB to ~47KB (uncompressed)