Vite
One setting: workers as ES modules.
// vite.config.ts
import { defineConfig } from 'vite';
export default defineConfig({
worker: { format: 'es' },
});// src/main.tsx
import { createRoot } from 'react-dom/client';
import { VideoEditor } from '@video-ultra/react';
import '@video-ultra/react/styles.css';
createRoot(document.getElementById('root')!).render(
<div style={{ height: '100dvh' }}>
<VideoEditor />
</div>,
);The engine's workers ship inside the package and are found with new URL(…, import.meta.url), which Vite, Next.js (webpack or Turbopack) and other modern bundlers follow — nothing to copy by hand. A working example is in apps/examples/vite in the repository.