labnotes

Leaflet markers with vite build

tags
leaflet
vite

Contents

1
2
3
4
5
6
7
8
import markerIconUrl from "leaflet/dist/images/marker-icon.png";
import markerIconRetinaUrl from "leaflet/dist/images/marker-icon-2x.png";
import markerShadowUrl from "leaflet/dist/images/marker-shadow.png";

L.Icon.Default.prototype.options.iconUrl = markerIconUrl;
L.Icon.Default.prototype.options.iconRetinaUrl = markerIconRetinaUrl;
L.Icon.Default.prototype.options.shadowUrl = markerShadowUrl;
L.Icon.Default.imagePath = "";

Previously

labnotes

Deploying static vite site on fly

silly silly

tags
flyio
static_sites

Next

labnotes

Using pushState and replaceState

better linking

tags
javascript