Skip to content

btpschroeder/leaflet-webpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leaflet-webpack

This repository contains code illustrating how to use Leaflet with webpack.

Instructions

To see the code in action, clone or download the repository. Navigate to the directory in your terminal of choice and run npm install.

After npm installs all of the dependencies, type npm run build to bundle all of the assets with webpack.

You can then open dist/index.html in your browser. This should show a basic Leaflet map with a point on the Lincoln Memorial in Washington, D.C. Viewing the page source confirms that all assets are coming from one bundle.js file.

Usage

This webpack configuration is as bare-bones as possible to work with Leaflet. If you are going to use it for development, I recommend a basic understanding of webpack.

You will probably want to update the webpack config to include a transpiler, dist folder clean-up, webpack-dev-server, etc.

About

Minimal boilerplate to use Leaflet with webpack

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published