Older browsers (mainly Edge and IE11) as well as versions of Node.js prior to v11 do not provide certain classes that loaders.gl depends on.
While there are many good polyfill modules available on
npm, to make the search for a version that works perfectly with loaders.gl a little easier, a polyfill module is included.
npm install @loaders.gl/polyfills
@loaders.gl/polyfills before you start using other loaders.gl modules.
import '@loaders.gl/polyfills'; import '@loaders.gl/core';
|Node.js < 11||Yes (Older browsers)|
fetch polyfill supports a subset of the browser fetch API, including:
TextDecoder polyfills are provided to ensure these APIs are always available. In modern browsers these will evaluate to the built-in objects of the same name, however under Node.js polyfills are transparently installed.
Note: The provided polyfills only guarantee UTF8 support.
Header polyfill (for Node.js
fetch) is a fork of the implementation in https://github.com/github/fetch (MIT license).