UNPKG

@lobehub/chat

Version:

Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.

18 lines (15 loc) 529 B
// Polyfill DOMMatrix for pdfjs-dist in Node.js environment import { DOMMatrix } from '@napi-rs/canvas'; if (typeof global.DOMMatrix === 'undefined') { // @ts-ignore global.DOMMatrix = DOMMatrix; } // Polyfill URL.createObjectURL and URL.revokeObjectURL for pdfjs-dist if (typeof global.URL.createObjectURL === 'undefined') { global.URL.createObjectURL = () => 'blob:http://localhost/fake-blob-url'; } if (typeof global.URL.revokeObjectURL === 'undefined') { global.URL.revokeObjectURL = () => { /* no-op */ }; }