attempting the worker-loader fix to prevent mapbox from being transpiled
This commit is contained in:
parent
a09dfc6b23
commit
b0274d203a
3 changed files with 588 additions and 28 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue