UI-Leaflet.webpack
UI-Leaflet (https://github.com/angular-ui/ui-leaflet) and Leaflet markercluster (https://github.com/Leaflet/Leaflet.markercluster) structured with webpack.
Install
Install with npm: npm install --save ui.leaflet.webpack
Usage
; angular;
Notes
This module already requires Leaflet and Leaflet MarkerCluster plugin, so don't require them again.
Also, the Leaflet global object 'L' is exposed through an angular value 'L':
angular ;
Build Notes
This module has some files written with ES6, so you need a babel loader to build.
Install the babel-loader
npm install babel-loader babel-core babel-preset-es2015 webpack --save-dev
Add this loader into your webpack.config file
test: /\.js$/ exclude: // loader: 'babel-loader?presets[]=es2015'
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"