Problem
The browser bundle is 5.5MB because all cloud SDK dependencies are bundled together, even when users only need one provider
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
Problem
The browser bundle is 5.5MB because all cloud SDK dependencies are bundled together, even when users only need one provider
Current state:
@google-cloud/storage(server-side SDK) is in the browser bundledropboxSDK pulls in Node.js polyfills (crypto,util)Impact
Proposed fix
reference:
stats.html