markerikson / react-redux-cesium-testing-demo

A sample project demonstrating configuration of React, Redux, Webpack, Cesium, and Mocha
ISC License
51 stars 7 forks source link

Cesium integration #1

Open martin-s opened 8 years ago

martin-s commented 8 years ago

No real issue, but more a question about the status: Is it right that you still need to copy some assets to output folder (copyCesium.js)? Is there any progress in a webpack integration that you know?

markerikson commented 8 years ago

The repo at https://github.com/mmacaula/cesium-webpack instructs you to copy Cesium's assets to a folder before you can begin development. The setup I have in this repo allows you to directly serve Cesium's assets out of ./node_modules/cesium/ during development, and only copy them out to your production build folder as needed.

Not sure what "Webpack integration" you're looking for. Any specifics?

martin-s commented 8 years ago

Ok, I missed the devServer.js part. Hence, you add another static assets folder to your environment. I used the plain webpack-dev-server where I can only set one public path.

Regardig the webpack integration: I had the idea of loading package like it's done for font-awesome: https://www.npmjs.com/package/font-awesome-webpack So, you just have one single assets folder where all bundled data is compiled to. I know that cesium is another beast of a library ;-)

markerikson commented 8 years ago

Yeah, my actual app has a number of specific needs for proxying behavior and some other stuff, so I built my own dev server that uses webpack-dev-middleware. This repo is a stripped-down version of that app's setup.