This example demonstrates how the ol
package can be used with webpack 2.
Clone the project.
git clone [email protected]:79025aef325cd2837364400a105405b8.git ol-webpack
Install the project dependencies.
cd ol-webpack
npm install
Create a bundle for the browser.
npm run build
Open index.html
to see the result.
open index.html
@eflowbeach - Give it a try again now. It looks like
webpack-nano
no longer works (openlayers/ol-webpack#61 useswebpack-cli
instead). The setup in that repo is very bare bones. You can use a dev server, configure loaders, etc. just as you would with another webpack project.If you aren't already attached to webpack, I'd suggest vite as an alternative (see https://github.com/openlayers/ol-vite).