oskari-frontend icon indicating copy to clipboard operation
oskari-frontend copied to clipboard

Update OpenLayers 7.2.2 -> 7.5.2

Open ZakarFin opened this issue 2 years ago • 3 comments

The OpenLayers update doesn't work at least on dev server. Need to test this more at a later date (and possibly just migrate to 8.x).

ZakarFin avatar Sep 05 '23 11:09 ZakarFin

https://github.com/openlayers/ol-cesium/issues/1101 https://github.com/openlayers/ol-cesium/issues/1094#issuecomment-1710423741

ZakarFin avatar Nov 15 '23 10:11 ZakarFin

Still problems with the build.

With Cesium 1.109:

ERROR in ../oskari-frontend/node_modules/@cesium/engine/Source/Core/buildModuleUrl.js
Module parse failed: Unexpected token (41:27)
File was processed with these loaders:
 * ../oskari-frontend/node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|   if (typeof CESIUM_BASE_URL !== "undefined") {
|     baseUrlString = CESIUM_BASE_URL;
>   } else if (defined(import.meta) && defined(import.meta.url)) {
|     // ESM
|     baseUrlString = getAbsoluteUri(".", import.meta.url);
 @ ../oskari-frontend/node_modules/@cesium/engine/Source/Core/Iau2006XysData.js 1:0-49 203:11-25
 @ ../oskari-frontend/node_modules/@cesium/engine/Source/Core/Transforms.js
 @ ../oskari-frontend/node_modules/@cesium/engine/Source/Scene/Model/I3dmLoader.js
 @ ../oskari-frontend/node_modules/@cesium/engine/index.js
 @ ../oskari-frontend/node_modules/cesium/Source/Cesium.js
 @ ./node_modules/oskari-frontend/bundles/mapping/mapmodule/mapmodule.olcs.js

With Cesium 1.111:

ERROR in ../oskari-frontend/node_modules/@cesium/engine/Source/Core/buildModuleUrl.js 42:43
Module parse failed: Unexpected token (42:43)
File was processed with these loaders:
 * ../oskari-frontend/node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|   if (typeof CESIUM_BASE_URL !== "undefined") {
|     baseUrlString = CESIUM_BASE_URL;
>   } else if (defined((_import$meta = import.meta) === null || _import$meta === void 0 ? void 0 : _import$meta.url)) {
|     // ESM
|     baseUrlString = getAbsoluteUri(".", import.meta.url);
 @ ../oskari-frontend/node_modules/@cesium/engine/Source/Core/Iau2006XysData.js 1:0-49 203:11-25
 @ ../oskari-frontend/node_modules/@cesium/engine/Source/Core/Transforms.js
 @ ../oskari-frontend/node_modules/@cesium/engine/Source/Scene/Model/GeoJsonLoader.js
 @ ../oskari-frontend/node_modules/@cesium/engine/index.js
 @ ../oskari-frontend/node_modules/cesium/Source/Cesium.js
 @ ./node_modules/oskari-frontend/bundles/mapping/mapmodule/mapmodule.olcs.js

Tried configuring this for babel but it didn't affect the outcome:

    "babel-plugin-transform-import-meta": "^2.2.1",

ZakarFin avatar Nov 15 '23 14:11 ZakarFin

Tried updating babel-core & co in #2513 (merged it here) but doesn't seem to help.

ZakarFin avatar Nov 15 '23 15:11 ZakarFin