https://github.com/plotly/plotly.js/pull/7526 inlines the entire [`maplibre-gl.css`](https://unpkg.com/maplibre-gl@4.7.1/dist/maplibre-gl.css) stylesheet into the Plotly.js bundle, to fix the styling of attributions in MapLibre. This works, but also adds about 45 kB to the bundle size. Plausibly we could slim down the CSS and include only the styles we definitely need. This file (4 kB) is enough to fix the attribution styling: [maplibre-gl-attrib.css](https://github.com/user-attachments/files/22013250/maplibre-gl-attrib.css) However this will require adding a script to parse and subset the CSS which runs as part of the build process.
Activity
jendrikw commentedon Sep 18, 2025
I use plotly in a vite-bundled website like so:
As you can see, I'm not using any map functionality, but I can see the maplibre css in my bundle. Is there any way of excluding this?