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
@tschaub Oh, thanks! I tried that version too and got:
$ npm run build
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
It may be something with my versions of Node and npm...
https://stackoverflow.com/questions/73144960/error-error0308010cdigital-envelope-routinesunsupported-at-new-hash-nodei
Not a big deal as I'm just trying to see how easy it is to build an OpenLayers project with WebPack.