# Frustum Geometry working with Craco but not with Vite, Please Guide if someone has faced same situation?

**URL:** <https://community.cesium.com/t/frustum-geometry-working-with-craco-but-not-with-vite-please-guide-if-someone-has-faced-same-situation/41979>\
**Category:** CesiumJS\
**Created:** [July 10, 2025, 12:17pm UTC](https://community.cesium.com/t/frustum-geometry-working-with-craco-but-not-with-vite-please-guide-if-someone-has-faced-same-situation/41979 "2025-07-10T12:17:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zahid\_Khan](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/zahid_khan/32/30155_2.png) [@Zahid\_Khan](https://community.cesium.com/u/Zahid_Khan)\
**Post date:** [July 10, 2025, 12:17pm UTC](https://community.cesium.com/t/frustum-geometry-working-with-craco-but-not-with-vite-please-guide-if-someone-has-faced-same-situation/41979/1 "2025-07-10T12:17:41Z")

</div>

![Screenshot from 2025-07-10 15-27-19](https://global.discourse-cdn.com/cesium/original/3X/f/9/f9d8641b3f0421c77e5beaf42c2ed8afbdc07e93.png)  
Above one is Craco Image  
 ![Screenshot from 2025-07-10 17-11-56](https://global.discourse-cdn.com/cesium/original/3X/a/8/a85ce6bb8785585c5b5ea1586dca5c819348a32c.jpeg)  
Above one is Vite Image

---

<div class="post-metadata">

**Author:** ![jjspace](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jjspace/32/4102_2.png) [@jjspace](https://community.cesium.com/u/jjspace)\
**Post date:** [July 10, 2025, 4:44pm UTC](https://community.cesium.com/t/frustum-geometry-working-with-craco-but-not-with-vite-please-guide-if-someone-has-faced-same-situation/41979/2 "2025-07-10T16:44:06Z")

</div>

Hey @Zahid_Khan, sorry you’re having issues.

I’m not really familiar with Craco so I can’t really help with the specifics there. Would you be able to share more about your configuration? Is it the same application in both instances?

We have a dedicated `vite` build example using CesiumJS. Maybe looking at the configs we recommend can help you. [GitHub - CesiumGS/cesium-vite-example: The minimal recommended setup for an application using Cesium with Vite.](https://github.com/CesiumGS/cesium-vite-example)

---

<div class="post-metadata">

**Author:** ![Zahid\_Khan](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/zahid_khan/32/30155_2.png) [@Zahid\_Khan](https://community.cesium.com/u/Zahid_Khan)\
**Post date:** [July 14, 2025, 3:14pm UTC](https://community.cesium.com/t/frustum-geometry-working-with-craco-but-not-with-vite-please-guide-if-someone-has-faced-same-situation/41979/3 "2025-07-14T15:14:30Z")

</div>

Here is my vite configs:

import { defineConfig } from ‘vite’;  
import react from ‘@vitejs/plugin-react’;  
import cesium from ‘vite-plugin-cesium’;  
import { viteStaticCopy } from ‘vite-plugin-static-copy’;

const cesiumSource = ‘node\_modules/cesium/Build/Cesium’;  
const cesiumBaseUrl = ‘cesium’;

export default defineConfig({  
plugins: [  
react({  
include: [‘ **/\*.jsx’, '** /_.js’, '\*\*/_.tsx’, ‘\*\*/\*.ts’],  
babel: {  
plugins: [  
[‘@babel/plugin-transform-react-jsx’, { runtime: ‘automatic’ }]  
]  
}  
}),  
cesium(),  
viteStaticCopy({  
targets: [  
{ src: `${cesiumSource}/Workers`, dest: cesiumBaseUrl },  
{ src: `${cesiumSource}/Assets`, dest: cesiumBaseUrl },  
{ src: `${cesiumSource}/Widgets`, dest: cesiumBaseUrl },  
{ src: `${cesiumSource}/ThirdParty`, dest: cesiumBaseUrl },  
],  
}),  
],  
define: {  
CESIUM\_BASE\_URL: JSON.stringify(cesiumBaseUrl),  
},  
server: {  
port: 3000,  
proxy: {  
‘/api’: ‘[http://localhost:5000](http://localhost:5000)’,  
},  
},  
resolve: {  
alias: {  
‘@’: ‘/src’,  
},  
},  
optimizeDeps: {  
exclude: [‘react-virtualized’],  
include: [‘prop-types’],  
},  
build: {  
assetsInlineLimit: 0,  
commonjsOptions: {  
include: [/react-virtualized/, /node\_modules/],  
},  
chunkSizeWarningLimit: 1600,  
},  
});

---

<div class="post-metadata">

**Author:** ![Zahid\_Khan](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/zahid_khan/32/30155_2.png) [@Zahid\_Khan](https://community.cesium.com/u/Zahid_Khan)\
**Post date:** [July 14, 2025, 3:59pm UTC](https://community.cesium.com/t/frustum-geometry-working-with-craco-but-not-with-vite-please-guide-if-someone-has-faced-same-situation/41979/4 "2025-07-14T15:59:18Z")

</div>

I figured out this , @jjspace problem arises when i upload 3D Tileset but its not rendering the map in 3D view , dont know if cesium need specific config with vite while i have shared my configs with you … Sharing you pictures where on Craco is rendering 3D map with tileset while vite not with same tileset.

 ![Screenshot from 2025-07-14 19-47-12](https://global.discourse-cdn.com/cesium/original/3X/4/b/4b1d0ea1c6939c7749c8da9b79309edab8e2188b.jpeg)  
 ![Screenshot from 2025-07-14 19-45-03](https://global.discourse-cdn.com/cesium/original/3X/9/4/94656efb848c606e6e5279697661abf474e25087.jpeg)

---

<div class="post-metadata">

**Author:** ![jjspace](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jjspace/32/4102_2.png) [@jjspace](https://community.cesium.com/u/jjspace)\
**Post date:** [July 14, 2025, 4:47pm UTC](https://community.cesium.com/t/frustum-geometry-working-with-craco-but-not-with-vite-please-guide-if-someone-has-faced-same-situation/41979/5 "2025-07-14T16:47:45Z")

</div>

@Zahid_Khan the only configuration that I know is needed for Vite is what is shown in our [vite example](https://github.com/CesiumGS/cesium-vite-example). The `vite-plugin-cesium` library is not created or maintained by us. I’m not familiar with what it’s doing so there’s a chance it’s modifying the build somehow?

I’m not as well versed in the other parts of your config to suggest anything else for certain. The server + proxy sticks out as a possibility of not letting it load the data correctly depending how you’re fetching it.

Are you getting any errors in the app? I would not expect it to just not render without some errors or failed network requests. It’s possible it’s a cesium bug but since it works with the CRACO configuration I suspect it’s something int he build process.

---

<div class="post-metadata">

**Author:** ![Zahid\_Khan](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/zahid_khan/32/30155_2.png) [@Zahid\_Khan](https://community.cesium.com/u/Zahid_Khan)\
**Post date:** [July 16, 2025, 6:45am UTC](https://community.cesium.com/t/frustum-geometry-working-with-craco-but-not-with-vite-please-guide-if-someone-has-faced-same-situation/41979/6 "2025-07-16T06:45:50Z")

</div>

One of the same kind problem is faced by a user , i am sharing a link but no solution is given to him at all.

> [@@cesium/engine and @cesium/widgets with vite](https://community.cesium.com/t/cesium-engine-and-cesium-widgets-with-vite/34965):
>
> Hi all, I am trying to get @cesium/engine and @cesium/widgets running with Vite. So far, I don’t get any error messages, but 3D tiles and terrain are not displayed at all (although the data is being fetched). My vite.config.js looks like this: import { defineConfig } from "vite"; import { viteStaticCopy } from "vite-plugin-static-copy"; const cesiumBaseUrl = "cesiumStatic"; export default defineConfig({ base: "./", define: { CESIUM\_BASE\_URL: JSON.stringify(cesiumBaseUrl), }, plu…

---

<div class="post-metadata">

**Author:** ![Zahid\_Khan](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/zahid_khan/32/30155_2.png) [@Zahid\_Khan](https://community.cesium.com/u/Zahid_Khan)\
**Post date:** [July 16, 2025, 7:04am UTC](https://community.cesium.com/t/frustum-geometry-working-with-craco-but-not-with-vite-please-guide-if-someone-has-faced-same-situation/41979/7 "2025-07-16T07:04:12Z")

</div>

The demo repo share by cesium vite plugin creator have a plugin of cesium and she’s claiming for creating it.
