npm i vite-plugin-cesiumjs -D
import { defineConfig } from 'vite';
import Cesiumjs from 'vite-plugin-cesiumjs';
export default defineConfig({
plugins: [
Cesiumjs()
],
});
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 |
import { defineConfig } from 'vite';
import Cesiumjs from 'vite-plugin-cesiumjs';
export default defineConfig({
plugins: [
Cesiumjs({
url: '/earth',
outDir: 'earth',
}),
],
});