I using the survivejs.com site as a template to build a map based React app with webpack. For the map i am using leaflet but i can\'t find a way to add the leaflet.css. With
In my applications that use webpack (via create-react-app) I add the following line to the top of my css file relevant for maps:
/* map.css */
@import '~leaflet/dist/leaflet.css';
For example, this file could be map.css
. I also put any custom map css styles in this file.
Then in my javascript / jsx file that uses the Map
Component, I import this css file:
// map.js
import './map.css'