CesiumGS / cesium-webpack-example

The minimal recommended setup for an application using Cesium with Webpack.
Apache License 2.0
245 stars 161 forks source link

Update for webpack4, latest cesium, and optionally vue.js? #12

Open fnoop opened 6 years ago

fnoop commented 6 years ago

Hi, this is a great resource along with the doc page https://cesiumjs.org/tutorials/cesium-and-webpack/ (which could be referenced from this repo readme, to be helpful), but it's out of date now. I've spent the past day chasing my tail trying to get the latest cesium (1.49) to work with webpack 4, and vue.js. The docs and repo here are out of date and don't work, and while there are lots of helpful issues and posts around that hint at how to fix various issues, I've yet to hit on the magic combination that works. This shouldn't be this difficult! (but thanks for your great efforts so far)

tkazik commented 5 years ago

If I may add: I would also love to see a simple example regarding models (gltf/glb). What loader would you suggest? Thank you and keep up the good work!

Rackar commented 5 years ago

If I may add: I would also love to see a simple example regarding models (gltf/glb). What loader would you suggest? Thank you and keep up the good work!

haha, I just got that. In webpack config add this plugins: [ new CopyWebpackPlugin([ { from: path.join('./static', 'model'), to: 'model3D'}]), ] and just use model: { uri: "model3D/Monster/Monster.gltf", }

dengzengjian commented 5 years ago

Hi,i have heard that you have build a programe which combined vue with cesium ,in these days,i try to make it too,but i have met many issues ,could u send me a demo like that ? thanks a lot

Rackar commented 5 years ago

Hi,i have heard that you have build a programe which combined vue with cesium ,in these days,i try to make it too,but i have met many issues ,could u send me a demo like that ? thanks a lot

that's my config file and demo in gitee gitee.com/rackar/CesiumVueVant/blob/master/vue.config.js

richard1015 commented 4 years ago

@fnoop Vue.js using demo https://github.com/richard1015/cesium-vue-example

bluehaoran commented 4 years ago

Hey @fnoop, I've actually been chasing my tail this last week trying to get Webpack +Cesium + Vue working. This is what I ended up with as a proof of concept. It's simpler than @richard1015's; so you won't get Vue Router stuff, but it's the bare minimum to build and include Cesium in a Vue component. https://github.com/bluehaoran/cesium-on-vue

SamuelDudley commented 4 years ago

I'm working with @fnoop where we are integrating cesium into a Vue application. Our current proof of concept is https://github.com/SamuelDudley/vue-vanilla-cesium

This application uses the vue-cli, vuex, vue-router and demonstrates a non-trivial data binding.