vite-plugin-cesiumjs
v2.0.8
Published
vite-plugin-cesiumjs
Downloads
92
Readme
⚡vite-plugin-cesiumjs
Quickly start Cesium
in Vite
.
install
npm i vite-plugin-cesiumjs -D
vite.config.ts
import { defineConfig } from 'vite';
import Cesiumjs from 'vite-plugin-cesiumjs';
export default defineConfig({
plugins: [
Cesiumjs()
],
});
API
| property | type | description | default |
|:----------:|:----------------:|:-------------------------------------------------:|:--------------:|
| url | string | cesium base url | '/cesium' |
| outDir | string | cesium outDir(base on the vite dist directory) | 'cesium' |
| polyfill | boolean | cesium version < 1.114.0 set the value to true | undefined |
| unminified | boolean | cesium uses uncompressed code | undefined |
Example
import { defineConfig } from 'vite';
import Cesiumjs from 'vite-plugin-cesiumjs';
export default defineConfig({
plugins: [
Cesiumjs({
url: '/earth',
outDir: 'earth',
}),
],
});