CommonJS friendly Cesium code?

Hello, does Cesium have its own source code already converted to CommonJS? If no, what is the best way to convert them? I saw this thread but it doesn't seem to have much information.

https://groups.google.com/forum/embed/?place=forum/cesium-dev&showsearch=true&showpopout=true&hideforumtitle=true&fragments=true&parenturl=https%3A%2F%2Fcesiumjs.org%2Fforum%2F#!searchin/cesium-dev/commonjs/cesium-dev/h2dXMdjZACM/sCEKDnsBBwAJ

No. Cesium’s source is written using the AMD module format, not CommonJS or ES modules.

What are you actually trying to accomplish? If you’re using Webpack, it can ingest any of those formats. If you’re using Browserify, I would assume that there’s some way for it to ingest AMD modules, but I don’t know what.

Hi there,

Mark is correct, Cesium is written in AMD. There is interest in moving to ES6 modules in the long term.

Thanks,

Gabby

You can indeed use Browserify (with the deAMDify transform) to require Cesium -- up to Cesium version 1.24. More recent versions, unfortunately, silently won't display any entities despite the entities collection appearing the same when structurally examined (though maps and layers work as expected).