Try to add
Object.defineProperty(globalThis, 'CESIUM_BASE_URL', {
value: '/cesium-package/'
})
before using CesiumJS. I just learn a bit about svelte, and I find it seems no main.js in svelte. In default settings, vite-plugin-cesium-build will add the code above to your main.js or main.ts to set CESIUM_BASE_URL.