cesium icon indicating copy to clipboard operation
cesium copied to clipboard

Non-standard javascript naming convention _commonjsHelpers.js downstream issues

Open jobeninc opened this issue 2 years ago • 2 comments

I upgraded my Cesium from 1.92 to 1.97 and my local development environment worked great but when I deployed the application as a war file, it would not load the Cesium world graphic on all browsers.

Skipping all the backstory, the new file Cesium/Cesium/Workers/_commonjsHelpers-89c9b271.js caused a problem with my build process due to the underscore in front of the filename.

Apparently Grails asset-pipeline builds skip processing of all files that start with an underscore. http://www.asset-pipeline.com/manual/

I recognize this is not a "Cesium Problem", but it does arise because of a Cesium file not following normal javascript file naming conventions and it could easily be fixed if you removed the underscore from the beginning of the filename. I am certain someone else will run into this issue in the near future when they upgrade past Cesium 1.96 on their Grails application deployment.

Thanks!

jobeninc avatar Sep 12 '22 16:09 jobeninc

Hi @jobeninc, thanks for reporting this. We use rollup to package our workers, and use default options for code splitting to generated _commonjsHelpers. I'm surprised that it would be non-standard, as it's the default configuration. If it is a common problem though, we can look into options to prevent the underscore.

ggetz avatar Sep 13 '22 18:09 ggetz

Well I probably shouldn't have used the word "non-standard", since I am no authority on that. It is just a basic issue that occurs due to decisions made by two independent frameworks. Anyways, thanks for looking into it.

jobeninc avatar Sep 13 '22 20:09 jobeninc