mapbox / pbf

A low-level, lightweight protocol buffers implementation in JavaScript.
BSD 3-Clause "New" or "Revised" License
801 stars 107 forks source link

ESM Support #127

Closed codekrafter closed 4 months ago

codekrafter commented 3 years ago

Right now when using pbf in an angular application (or using a library that depends on pbf), angular emits a warning about using commonjs/amd dependencies, as they cause optimization bailouts and interfere with tree shaking.

Providing an esm module would fix these warnings and allow better optimization.

measuredweighed commented 1 year ago

A little late to the party, but I ended up creating a fork to generate esm modules which should act as a drop-in replacement for existing implementations in the short term.