## The problem
Issue optimizely/javascript-sdk#352 (closed, 11 comments): the distributed SDK was large (lodash, promise polyfill, then ODP and ua-parser-js in v5). Lodash and promises were removed in v4, but v5 grew again with ODP. Maintainers shipped v6 with a modular API that supports tree-shaking of unused components like OdpManager, significantly cutting bundle size.
## The fix
If the SDK bundle is too big, upgrade to v6, which has a modular API so bundlers can tree-shake unused pieces like OdpManager. On v5, import from @optimizely/optimizely-sdk/lite for edge-style deploys to skip the heavier modules, and disable ODP via odpOptions { disabled: true } if you dont use it, since ODP pulls in ua-parser-js.
## Notes
Thread: https://github.com/optimizely/javascript-sdk/issues/352. Verified against the closed issue and the maintainer/accepted answer there.