A cross-bundler plugin version 2.4.0 that syncs FoundryVTT compendiums with the file system, supporting Vite, Rollup, Webpack, and esbuild. It eliminates manual extraction and compilation steps by providing two-way synchronization during development (via WebSocket and HMR, Vite-only) and automatic JSON-to-LevelDB compilation at build time. Unlike alternatives, it does not access the database directly but uses Foundry's own document update mechanisms. Requires Node.js 24 and peer dependencies for each bundler. Ships TypeScript types.
npm install foundryvtt-syncNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows the recommended Vite setup with options and transformer. Plugin syncs compendiums bidirectionally in dev mode and compiles to LevelDB on build.
Use bundler-specific subpath imports: 'foundryvtt-sync/vite', 'foundryvtt-sync/rollup', etc.
Set 'folders: false' and 'expandAdventures: false' in your module.json's pack configuration during development.
Upgrade Node.js to version 24 or later.
Use const foundryvttSync = require('foundryvtt-sync/webpack') and add to plugins array.Run 'npm install --save-dev foundryvtt-sync' and ensure import uses correct subpath (e.g., 'foundryvtt-sync/vite').
Use bundler-specific subpath: import foundryvttSync from 'foundryvtt-sync/vite' (for Vite) or import from '/rollup', '/webpack', '/esbuild'.
Install foundryvtt-cli as a dev dependency: 'npm install --save-dev foundryvtt-cli'.