Description
The current CesiumJS distribution consists of a single, bundled JS entry point, Cesium.js
, which inlines all library JS code. It also ships with several other static files, including standalone Worker
JS files, third party wasm
files, JSON data, images/textures, and CSS files. Depending on what features of the library is being used, some or all of these static files are required to be loaded at runtime.
While we've operated with these static files as part of the distribution since the beginning, it can require extra infrastructure on the part of developers depending on CesiumJS. We'd like to re-evaluate our strategy and look into providing a single-file CesiumJS distribution
As a first step, we could allow an optional inline
flag as part of the build script. esbuild has a loader
option which allows other file types besides JS to be inlined most likely as data urls.
After ensuring everything works, we should put some thought into potentially shipping by default as part of the release zip.