CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.83k stars 3.46k forks source link

ES6 relative path is too deep #8301

Closed emackey closed 4 years ago

emackey commented 4 years ago

I still run a development build of Cesium out of a sub-folder of my local server, instead of at the root level as is customary with NodeJS. Occasionally, this causes bad relative paths to break.

In Apps/Sandcastle/load-cesium-es6.js, there is a relative path that has one too many parent folders:

import * as Cesium from "../../../Source/Cesium.js";

This is only 2 levels deep, but tries to climb up 3 levels, and breaks Sandcastle when run as a development build from a subfolder.

Note there may be other configurations (such as running a built Sandcastle from a subfolder) where the 3rd level may be needed.

mramato commented 4 years ago

Thanks @emackey we'll get this fixed for next release.

mramato commented 4 years ago

@emackey it was just this one path (plus load-cesium-es6.js isn't used in the built version).

I pushed a fix directly to master after hosting cesium under a sub-dir and running all of the tests and build Sadncastle.