maptiler / maptiler-sdk-js

Maps SDK tailored for MapTiler Cloud powered by MapLibre GL JS
https://docs.maptiler.com/sdk-js/
BSD 3-Clause "New" or "Revised" License
79 stars 14 forks source link

Fixing bundled imports #79

Closed moose115 closed 6 months ago

moose115 commented 7 months ago

Objective

See #78 for details. Bundled code contained an import from maplibre-gl.

import maplibregl, {addProtocol as addProtocol$1} from 'maplibre-gl';

Rather than importing from maplibre-gl again, the functions can be imported from index.ts where they are re-exported anyway, preventing the bundler from importing addProtocol as named import and renaming it.

Description

In caching.ts I tweaked the import.

Acceptance

The resulting bundle imports the default import from maplibre-gl only.

Checklist