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
This example doesn't seem to work anymore. I tried to get as close to possible as the suggested v7.2.2 quick start, but the webpack compiler doesn't like the '@'
$ npm run build
assets by status 220 KiB [cached] 1 asset
orphan modules 1.63 MiB [orphan] 255 modules
runtime modules 663 bytes 3 modules
cacheable modules 965 KiB
modules by path ./node_modules/ 17.8 KiB
./node_modules/rbush/index.js 16.1 KiB [built] [code generated]
./node_modules/quickselect/quickselect.js 1.72 KiB [built] [code generated]
./main.js + 168 modules 947 KiB [built] [code generated]
./style.css 160 bytes [built] [code generated] [1 error]
ERROR in ./style.css 1:0
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
webpack 5.75.0 compiled with 1 error in 2374 ms