968 B
968 B
⚡ vite-plugin-ice-mars3d
Easily set up a Cesium
project in [Vite
].
Install
npm i cesium vite-plugin-ice-mars3d vite -D
# yarn add cesium vite-plugin-ice-mars3d vite -D
Usage
add this plugin to vite.config.js
import { defineConfig } from 'vite';
import mars3dPlugin from 'vite-plugin-ice-mars3d';
export default defineConfig({
plugins: [mars3dPlugin()]
});
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 mars3dPlugin from 'vite-plugin-ice-mars3d';
export default defineConfig({
plugins: [
mars3dPlugin({
rebuildCesium: true
})
]
});