Importing npm package images


I am using npm packages leaflet@1.0.0 and leaflet-draw

import 'lealfet/dist/leaflet.css';
import 'leaflet-draw/dist/leaflet.draw.css';

var map ='mapcanvas', {
  drawControl: true
}).setView([500, 500], 0)

My problem is that the icons for the buttons don’t show up.

the CSS for the button says

background-image: url(images/spritesheet.png);

How do I load the images?


Great question. I’m running into the same issue. As far as I can tell, no answer yet:

Longer discussion here: