docs: maplibre-gl hat keinen Default-Export — Importzeile im Plan korrigieren

This commit is contained in:
Daniel Michelberger 2026-08-06 18:19:32 +02:00
parent 060c4434b9
commit b1f6f8d1e5

View file

@ -1690,7 +1690,10 @@ npm install maplibre-gl
* Komponente in Liste, Detailseite und Setzmodus gleichermaßen nutzbar. * Komponente in Liste, Detailseite und Setzmodus gleichermaßen nutzbar.
*/ */
import { onMount } from 'svelte' import { onMount } from 'svelte'
import maplibregl, { type Map as MapLibreMap, type Marker } from 'maplibre-gl' // maplibre-gl 6.x hat keinen Default-Export — ein `import maplibregl from`
// scheitert mit TS1192.
import * as maplibregl from 'maplibre-gl'
import type { Map as MapLibreMap, Marker } from 'maplibre-gl'
import 'maplibre-gl/dist/maplibre-gl.css' import 'maplibre-gl/dist/maplibre-gl.css'
type LineGeoJSON = { type: 'LineString'; coordinates: [number, number][] } type LineGeoJSON = { type: 'LineString'; coordinates: [number, number][] }