Building a Google Drive sync engine inside a Chrome Manifest V3 (MV3) extension requires rethinking state management, offline handling, and dependencies. Since MV3 Service Workers can be killed at any time, all state must be persisted immediately to chrome.storage.local rather than held in memory. Offline resilience is achieved by queuing changes locally and merging them with remote Drive data on reconnect using timestamp-based note IDs to avoid overwrites. The official Google API SDK was dropped entirely in favor of native fetch calls to the Drive v3 REST API, requiring manual construction of multipart/related HTTP request bodies but dramatically reducing bundle size and improving performance.
Table of contents
1. The Death of In-Memory State2. Handling Offline Drops3. Dropping the Google SDK for Native FetchEngineering for ConstraintsSort: