question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ignoring backend-only options - add a `force_exclude_options` plugin option

See original GitHub issue

Right now (v2.0.0-alpha.27) service and message options from .proto files are always generated for ServiceType.

It would be nice to have the ability to ignore all (or blacklist some) options for browser clients if they are used only on the backend.

These options just increase the final bundle size without ever being used or in the worst case can leak some backend implementation details, that shouldn’t be visible on the frontend to everyone.

The official protoc plugin for JS is not including options in the generated files, and I think that this is a reasonable default behaviour.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
timostammcommented, Sep 4, 2021

Added in https://github.com/timostamm/protobuf-ts/commit/ab9d65e0f66f6957efb9d8c96f71c526b5c698b8

  • “force_exclude_all_options” By default, custom options are included in the metadata and can be blacklisted with our option (ts.exclude_options). Set this option if you are certain you do not want to include any options at all.
0reactions
timostammcommented, Sep 8, 2021

Released in v2.0.4.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding new plugin option not available | WordPress.org
Hey everyone,. I'm trying to install this plugin but when I go to plugins in WordPress I don't see the option to add...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found