You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using pbjs with the static-module target produces a single JS bundle that contains the code for all transitively imported packages. I don't see an option to disable this behavior?
This is not ideal even for browser use cases, because any packages that are imported in multiple .proto files will appear in the bundles redundantly.
It also looks like they will clobber themselves at runtime, since the packages are attached to to $protobuf.roots["default"], e.g. $root.awesomepackage = (() => {. Any references to $root.awesomepackage would be destroyed once the code was redundantly loaded.
If bundling is desired, a tool such as rollup or webpack can be used by the consumer.
The text was updated successfully, but these errors were encountered:
protobuf.js version: 6.8.8
Using pbjs with the static-module target produces a single JS bundle that contains the code for all transitively imported packages. I don't see an option to disable this behavior?
This is not ideal even for browser use cases, because any packages that are imported in multiple .proto files will appear in the bundles redundantly.
It also looks like they will clobber themselves at runtime, since the packages are attached to to
$protobuf.roots["default"]
, e.g.$root.awesomepackage = (() => {
. Any references to$root.awesomepackage
would be destroyed once the code was redundantly loaded.If bundling is desired, a tool such as rollup or webpack can be used by the consumer.
The text was updated successfully, but these errors were encountered: