Anybody ever get Cesium working inside of a create-react-app setup? Hopefully without "ejecting" ?

668 views
Skip to first unread message

webd...@gmail.com

unread,
Apr 4, 2018, 3:50:01 PM4/4/18
to cesium-dev
1. A concise explanation of the problem you're experiencing.


2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.


3. Context. Why do you need to do this? We might know a better way to accomplish your goal.


4. The Cesium version you're using, your operating system and browser.

Mark Erikson

unread,
Apr 4, 2018, 4:36:11 PM4/4/18
to cesium-dev
Yes, you can use Cesium with CRA, but to my knowledge it still requires ejecting or using a tool like react-app-rewired to override parts of the config.

I specifically wrote a post showing what to add Cesium to a CRA app : http://blog.isquaredsoftware.com/2017/03/declarative-earth-part-1-cesium-webpack/

webd...@gmail.com

unread,
Apr 4, 2018, 7:27:50 PM4/4/18
to cesium-dev
Thanks for taking the time to write that blog posting!
I will soon start working my way through it.

On cursory view, I did not see you using the npm package "cesium-react" (https://github.com/rot1024/cesium-react)

Is that a limited implementation of cesium? (Sorry I'm a complete noob to Cesium at the moment)

Mark Erikson

unread,
Apr 5, 2018, 11:31:34 AM4/5/18
to cesium-dev
No, I haven't used that yet.  There was a post on the Cesium blog about it a couple months ago, though.  It provides React components that help simplify the process of setting up the Cesium globe and rendering some items on there.  As you can see in part 2 of my post ( http://blog.isquaredsoftware.com/2017/03/declarative-earth-part-2-cesium-react/ ) , I've done a more "manual" approach to wrapping up Cesium logic in React components.  If you're just getting started, though, that cesium-react library might be a good choice.

nswi...@gmail.com

unread,
Apr 9, 2018, 5:56:12 PM4/9/18
to cesium-dev
A few days ago I used create-react-app, ejected, and followed these instructions:
https://cesiumjs.org/tutorials/cesium-and-webpack/ ... a few changes were necessary but not much.
Reply all
Reply to author
Forward
0 new messages