protobuf-ts icon indicating copy to clipboard operation
protobuf-ts copied to clipboard

Adding an option to import well-known types from a provided package.

Open nicolasalt opened this issue 2 years ago • 0 comments

The user may want to have well-known types in a separate NPM package:

  • These generated files are always the same and may feel like they are polluting the codebase.
  • For Web, if multiple dependencies of a single project use well-known types, they'll be duplicated in the output Web bundle.

Ideally there would be a single NPM package with well-known types, maintained as a part of protobuf-ts, but this PR is an ok workaround for now.

This option is implemented as an environment variable because the options parser only supports boolean values.

nicolasalt avatar Jun 20 '22 19:06 nicolasalt