html-to-docx still reads Node globals after Vite rebundles; inject buffer polyfill, map global to globalThis, and alias the package to the browser build.
Co-authored-by: Cursor <cursoragent@cursor.com>
Vite was resolving the Node ESM entry which needs Buffer/global; switch to the browser bundle and pre-convert images to data URLs so seals and watermarks embed.
Co-authored-by: Cursor <cursoragent@cursor.com>