Leaflet markercluster (https://github.com/Leaflet/Leaflet.markercluster) structured with webpack.
Install with npm: npm install --save leaflet.markercluster.webpack
require('leaflet.markercluster.webpack');
This module already requires 'leaflet', so don't require it again. Also, the css files from leaflet and markercluster are already required too.
Also, the L object is exposed:
var L = require('leaflet.markercluster.webpack');
As this module requires some css files, you have to install a css loader.
Installing:
npm install --save-dev css-loader style-loader
And configure the loader in webpack.config:
{
test: /\.css$/, loader: "style-loader!css-loader"
}