fix: resolve MapLibre worker rendering regression by configuring custom worker and updating geometry type filters

This commit is contained in:
Hamza-Ayed
2026-09-24 18:49:40 +03:00
parent 043cd052b6
commit cb91e5f0de
6 changed files with 497 additions and 274 deletions
+10
View File
@@ -0,0 +1,10 @@
import maplibregl from 'maplibre-gl';
import workerUrl from 'maplibre-gl/dist/maplibre-gl-csp-worker.js?url';
// MapLibre 5 serializes its embedded worker from functions. Vite's class-field
// transform injects __publicField outside those functions, leaving GeoJSON
// workers with an undefined helper. Serve the matching standalone worker as an
// untransformed asset in both development and production, before any map exists.
maplibregl.setWorkerUrl(workerUrl);
export default maplibregl;