attempting the worker-loader fix to prevent mapbox from being transpiled

This commit is contained in:
csawatzky 2025-05-08 10:25:59 -06:00
parent a09dfc6b23
commit b0274d203a
3 changed files with 588 additions and 28 deletions

View file

@ -39,6 +39,9 @@ import { MapMouseEvent } from "mapbox-gl";
import { makeStyles } from "@mui/styles";
import { Result } from "@mapbox/mapbox-gl-geocoder";
import mapboxgl from "mapbox-gl";
mapboxgl.workerClass = require('worker-loader!mapbox-gl/dist/mapbox-gl-csp-worker').default;
//const MAPBOX_TOKEN = process.env.REACT_APP_MAPBOX_ACCESS_TOKEN;
const MAPBOX_TOKEN = import.meta.env.VITE_MAPBOX_ACCESS_TOKEN;