Closed simon04 closed 4 years ago
Ran into the same issue, i.e. the following is needed:
import 'leaflet-geosearch/dist/style.css'
import 'leaflet-geosearch/assets/css/leaflet.css'
This isn't super clear as the README
doesn't really mention much about styling (besides the style
option). Any particular reason for separating the two stylesheets?
To be honest, I think the dist file is just not compiled like it should. PR to fix it would be most welcome.
leaflet-geosearch v3
fixes this issue.
Either add https://unpkg.com/leaflet-geosearch@3.0.0/dist/geosearch.css
to your head, or import from leaflet-geosearch/dist/geosearch.css
Sorry for the long wait.
Due to the identifiers such as
.leaflet__leaflet-control-geosearch___35AKI
(originating fromcss-loader
's configlocalIdentName
inwebpack.config.babel.js
), the distributed CSS file cannot be used with thebundle.js
.The
docs/index.html
contains both thedist/style.css
as well as theassets/css/leaflet.css
: https://github.com/smeijer/leaflet-geosearch/blob/4a443db/docs/index.html#L16-L17