Skip to main content

Cesium Vite Notes

Setup was a bit more complicated than when we used craco. Here's a Cesium blog post for setting up vite (and webpack).

Static URLs are BAD

Notice in the following screenshot, the front window shows localhost:3000/cesium/Widgets/Images/etc.. while the rear window shows localhost:3000/dashboard/cesium/Widgets/etc.... The extra dashboard is being inserted in the URL which is causing content to not appear.

cesium static content missing, bad URL

It was caused by the 'base' definition in vite config. Changing it from '' to '/' fixed it.

vite config base setting