952 B
952 B
⚡ vite-plugin-earth
Easily set up a Cesium
& mars3d
project in [Vite
].
Install
npm i cesium vite-plugin-earth vite -D
# yarn add cesium vite-plugin-earth vite -D
Usage
add this plugin to vite.config.js
import { defineConfig } from 'vite';
import earthPlugin from 'vite-plugin-earth';
export default defineConfig({
plugins: [earthPlugin()]
});
add dev command to package.json
"scripts": {
"dev": "vite",
"build": "vite build"
}
run:
yarn dev
Options
rebuildCesium
- Type :
boolean
- Default :
false
Default copy min cesium file to dist. if true
will rebuild cesium from source.
import { defineConfig } from 'vite';
import earthPlugin from 'vite-plugin-earth';
export default defineConfig({
plugins: [
earthPlugin({
rebuildCesium: true
})
]
});