react-three-map/maplibre imports from mapbox.
-
threeversion: 0.174.0 -
@react-three/fiberversion: 9.1.0 -
react-three-mapversion: 0.8.2 -
nodeversion: 22.14.0 -
npm(oryarn) version: (npm) 10.9.2
Problem description:
I'm using maplibre. When I do the import of the package using react-three-map/maplibre I get warnings as it's looking for mapbox-gl. It looks like there is an issue with the vite setup maybe, as the file dist/maplibre/es/main3.js ends up with imports from mapbox-gl and react-map-gl (should be react-map-gl/maplibre). Not sure what is happening with the vite process - will investigate if I can find time.
Relevant code:
As described - importing the maplibre package results in bad internal imports.
Suggested solution:
The actual source file looks correct, so it looks like it's something going on with how the package is built. Not had much time to investigate though. If I can find time, then I will look.
@vespasianvs can you try with our @next release? (npm i react-three-map@next or yarn add react-three-map@next)
Also, be aware maplibre >= 5 doesn't seem to work at the moment, but should work with latest v4 ( https://github.com/RodrigoHamuy/react-three-map/issues/137 ).
This is working fine with v1.0.0 so happy to close this.