This is a basic project to start using OpenLayers 5.x with Webpack.
- Separate webpack configurations for development and production. Development config features source mapping and a localhost server with live reloading and hot module replacement. Production config focuses on minified bundles, lighter weight source maps to improve load time
- Babel with env preset
- OpenLayers 5 with ES6 module imports
- Normalize.css for CSS consistency
- ol-layerswitcher control for basic layer management
Clone or download the project and then install the dipendencies:
cd ol-webpack-starter
npm install
Start the development server:
npm start
Create a minified bundle:
npm run build