Installation
Add the@despia/local plugin to your build:
Framework integration
- Vite
- Webpack
- Rollup
- Nuxt
- SvelteKit
- Astro
- Remix
- esbuild
- Universal
Covers React, Vue, Svelte, Preact, and Lit projects using Vite.
vite.config.js
Configure @despia/local for a specific framework and verify the manifest output. The agent will wire up the plugin, run the build, and confirm despia/local.json is generated correctly. Provide your framework, output directory, and entry HTML filename.
Configuration options
All plugins accept the same options:| Option | Type | Default | Description |
|---|---|---|---|
outDir | string | 'dist' | Output directory to scan for assets |
entryHtml | string | 'index.html' | Entry HTML filename to include in manifest |
Manifest schema
The plugin hooks into your build tool’s completion event, scans the output directory, and generates the manifest atdespia/local.json.
despia/local.json
| Field | Description |
|---|---|
entry | The entry HTML file path. Always required for client-side rendering. |
deployed_at | Timestamp in milliseconds (as string) when the manifest was generated. Updated on every deployment and used by the OTA cache system to detect new builds. |
assets | Alphabetically sorted array of all asset paths, including the entry file. |
deployed_at, guarantee offline operation, and perform atomic updates safely.
Version guards
For apps that need to maintain compatibility across different runtime versions, usedespia-version-guard to conditionally render features based on the installed native runtime version.
| Use case | Why it helps |
|---|---|
| Store compliance | Version-gate major UI changes to satisfy review requirements |
| Prevent broken UI | Ensure features only render when the required runtime capability is available |
| Smooth rollouts | Gradually introduce new capabilities without forcing immediate updates |
| Enterprise stability | Maintain consistent behavior across deployments with mixed runtime versions |
despia-version-guard supports React, Vue, Angular, Svelte, and Vanilla JS / Web Components.
Add version guards to an existing Despia web app. The agent will wrap the correct components in VersionGuard, identify the minimum version needed for each feature, and ensure fallback UI is in place for older runtimes. Provide your framework and the features you want to version-gate.
Troubleshooting
Manifest not generated- Ensure the build completes without errors before checking for the manifest
- Confirm the output directory exists at the path specified in
outDir - Verify the
outDiroption matches your build tool’s configured output directory - Check the console for error messages from the plugin
- The plugin scans the entire output directory — confirm assets are copied there during the build step
- Check that file paths resolve correctly relative to the output root
- All paths are automatically normalised to root-relative format
- Paths starting with
/are preserved as-is - Windows backslashes are converted to forward slashes automatically
External resources
@despia/local on npm
Full package documentation, version history, and changelog.
despia-native SDK
Reference for the JavaScript bridge and all 30+ native API bindings.