sw-fe/fix-maplibre-css.sh

20 lines
494 B
Bash
Executable File

#!/bin/bash
echo "Checking for maplibre-gl.css..."
if [ -f node_modules/maplibre-gl/dist/maplibre-gl.css ]; then
CSS="maplibre-gl/dist/maplibre-gl.css"
elif [ -f node_modules/maplibre-gl/maplibre-gl.css ]; then
CSS="maplibre-gl/maplibre-gl.css"
else
echo "❌ Aucun fichier CSS trouvé dans maplibre-gl"
exit 1
fi
echo "✔ CSS found at: $CSS"
echo "✔ Updating MapView.jsx..."
sed -i "s|import .*maplibre.*css.*|import \"$CSS\";|" src/components/Map/MapView.jsx
echo "✔ Done!"