Registry / data / vite-plugin-gvemap

vite-plugin-gvemap

JSON →
library1.1.15jsnpmunverified

A Vite plugin that simplifies integrating the gvemap (Cesium-based) library into Vite projects. Version 1.1.15, actively maintained. It handles Cesium static assets, worker files, and module resolution. Key differentiators: automatic copy of Cesium assets to build output, optional rebuild from source, and seamless Cesium import. Requires gvemap ^1.1.1 and Vite >=2.7.1, ships TypeScript types.

npm install vite-plugin-gvemap
INSTALL
IMPORT
SIG · VITE-PLUGIN-GVEMAP
V
vite-plugin-gvemap
datajavascriptv1.1.15
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (plugin)
import cesium from 'vite-plugin-gvemap'
const cesium = require('vite-plugin-gvemap')
ESM-only plugin, cannot be used with require() in CJS.
cesium (named export)
import { cesium } from 'vite-plugin-gvemap'
import { cesiumPlugin } from 'vite-plugin-gvemap'
Named export is exactly 'cesium', not 'cesiumPlugin'.
Cesium.Viewer
import { Viewer } from 'cesium'
import { Viewer } from 'gvemap'
The plugin integrates the 'gvemap' package, but Cesium symbols are imported from 'cesium' (or the cesium namespace).

Minimal Vite configuration to add the gvemap plugin, enabling Cesium GIS support in a Vite project.

import { defineConfig } from 'vite'; import cesium from 'vite-plugin-gvemap'; export default defineConfig({ plugins: [cesium()] });
Debug
Known issues
gotchaThe plugin copies Cesium static assets from node_modules/cesium to the public directory at build time. If you delete or modify those assets manually, the build may break.
fix
Do not manually alter node_modules/cesium; rely on the plugin's automatic copy.
affects: >=1.0.0
gotchaWhen using `rebuildCesium: true`, the plugin rebuilds Cesium from source, which requires additional build tools (e.g., Node.js, rollup) and significantly increases build time.
fix
Only enable rebuildCesium if you need custom Cesium modifications; otherwise keep default false.
affects: >=1.0.0
deprecatedThe option `cesiumPath` was removed in v1.1.0. Previously you could specify a custom path to Cesium; now the plugin uses the 'cesium' package from node_modules.
fix
Remove any `cesiumPath` option; ensure 'cesium' is installed as a dependency.
affects: >=1.1.0
gotchaThe plugin expects the 'cesium' package to be installed, not the 'gvemap' package directly (gvemap is the package name but it re-exports cesium). Make sure you install 'cesium' as a dependency.
fix
Run `npm install cesium` or `yarn add cesium`.
affects: >=1.0.0
Errors
Common errors & fixes
Failed to resolve import "cesium" from "src/index.js". Does the file exist?
Cesium package not installed or not in node_modules.
fix
Install cesium: `npm install cesium`
TypeError: cesium is not a function
Using default import instead of named import when plugin expects a default export.
fix
Use `import cesium from 'vite-plugin-gvemap'` (default) not `import { cesium } from 'vite-plugin-gvemap'`.
The 'cesium' package could not be found. Make sure it is installed.
The plugin tries to resolve 'cesium' but it's missing.
fix
Install cesium as a dependency.
[vite] Build failed with 1 error: ENOTDIR: not a directory, copyfile '.../node_modules/cesium/Build/Cesium/Cesium.js'
The 'cesium' package may be installed incorrectly or has a different structure.
fix
Reinstall cesium: `npm reinstall cesium`
Upgrade
Version history
1.1.15latest on npm
Audit
Dependencies
gvemaprequiredPeer dependency: the GIS mapping library that this plugin integrates with
viterequiredPeer dependency: the build tool that this plugin extends
Agent activity
34 hits · last 30 days
node
28
OpenAI (training)
1
Resources
vite-plugin-gvemap — npm install vite-plugin-gvemap · libregistry