W3C fetch() API polyfill for Taro 3+ miniapp frameworks. Current stable version is 0.5.8. Provides a ponyfill that works around the locked global object in miniapps, allowing developers to use the standard fetch() interface instead of Taro's native request API. Ships TypeScript types. Updated infrequently.
npm install taro-fetch-polyfillNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic fetch usage with JSON parsing and error handling.
Import { fetch } from the package instead of expecting window.fetch or globalThis.fetch.Test thoroughly; some features like streaming or abort may not work.
Consider alternatives or fork the project.
Use named import: import { fetch } from 'taro-fetch-polyfill';Import fetch as a ponyfill: import { fetch } from 'taro-fetch-polyfill'; then call fetch() directly.Install the package and its peer dependency: npm install taro-fetch-polyfill @tarojs/taro