FlowDrop’s editor is a rich component with many dependencies. This guide covers strategies to minimize bundle impact and ensure smooth performance at scale.
Bundle sizes
Approximate gzip sizes by entry point:
Use specific entry points rather than @flowdrop/flowdrop to tree-shake unused modules.
Lazy loading the editor
The editor bundle is large. Load it only when the user navigates to the editor page:
React
Where FlowDropEditor is a wrapper component that calls mountFlowDropApp in a useEffect.
Deferring CodeMirror
If you use code or markdown fields but not on every page, load them on demand:
SSR guard patterns
FlowDrop accesses window, document, and browser APIs — it cannot run on the server. Always guard your mount calls.
SvelteKit
Next.js (App Router)
Nuxt
Vite optimizeDeps
If you see Failed to resolve import errors during development, exclude FlowDrop from Vite’s pre-bundling:
See the Installation guide for more setup tips.
For workflows with many nodes (50+):
Use batch updates
Use history transactions
Group related changes into a single undo step:
Disable auto-save for programmatic updates
When making many changes programmatically, temporarily disable auto-save:
See Mount API for the full features options.