I wanted to upgrade to the latest to use some nice new features. I am using ExtJS so I have to use a bundle with ol
global variable. I followed this step to create it but it uses Parcel
. I also tried Rollup, Webpack, and Browserify with no success. When using their bundles, I get the following error:
Uncaught ReferenceError: ol is not defined
This is because I want to use it in a code like this:
const map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
],
view: new ol.View({
center: [0, 0],
zoom: 0
})
});
Is there any other way of getting a bundle that does not use imports?