Skip to content

bundle size is 5.5MB #295

@ahmedjaziri41

Description

@ahmedjaziri41

Problem

The browser bundle is 5.5MB because all cloud SDK dependencies are bundled together, even when users only need one provider

Image Image

Current state:

  • User wants Google Drive only -> still downloads AWS, Azure, Dropbox, OneDrive SDKs
  • @google-cloud/storage (server-side SDK) is in the browser bundle
  • dropbox SDK pulls in Node.js polyfills (crypto, util)

Impact

  • Slow initial page load
  • Wasted bandwidth for end users
  • The 10KB size limit in package.json is impossible to meet

Proposed fix

  • Split each adapter into lazy-loaded chunks
  • Move @google-cloud/storage to server-only bundle (it s already only used in index.node.ts)
  • Remove unused dependencies (per depcheck)
  • use debounce

reference:
stats.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions