CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.73k stars 3.45k forks source link

cesium + vite #9247

Closed vinnitu closed 3 years ago

vinnitu commented 3 years ago

I have opened question about using cesium in es6 style, can you give me advise how to solve this issue?

https://github.com/vitejs/vite/issues/1058

cxdev commented 3 years ago

cesium need a BaseUrl to find its assets, you should copy Assets in your publicFiles like

image

and add window.CESIUM_BASE_URL where there are in your main.js.

you can see https://cesium.com/docs/tutorials/quick-start/#step-2-set-up-the-cesiumjs-client Install with NPM

hpinkos commented 3 years ago

@vinnitu if you have follow up questions, please ask on our community forum

nshen commented 3 years ago

I wrote a vite plugin for cesium, it is very easy to use, please check. https://github.com/nshen/vite-plugin-cesium

martinadamsdev commented 3 years ago

@vinnitu I wrote a simple Vue Cesium Vite App template, you can take a look. https://github.com/martinageradams/vue-cesium-vite-app

zouyaoji commented 3 years ago

or quickstart of vue-cesium

https://github.com/zouyaoji/vue-cesium-vite-starter