|
@@ -31,7 +31,6 @@ const initWorker = async () => {
|
|
|
const pdfjsVersion = PDF.version
|
|
const pdfjsVersion = PDF.version
|
|
|
const urls = [
|
|
const urls = [
|
|
|
// 1. 优先使用 CDN,规避所有本地服务器配置问题
|
|
// 1. 优先使用 CDN,规避所有本地服务器配置问题
|
|
|
- `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjsVersion}/pdf.worker.min.mjs`,
|
|
|
|
|
`https://cdn.jsdelivr.net/npm/pdfjs-dist@${pdfjsVersion}/build/pdf.worker.min.mjs`,
|
|
`https://cdn.jsdelivr.net/npm/pdfjs-dist@${pdfjsVersion}/build/pdf.worker.min.mjs`,
|
|
|
`https://unpkg.com/pdfjs-dist@${pdfjsVersion}/build/pdf.worker.min.mjs`,
|
|
`https://unpkg.com/pdfjs-dist@${pdfjsVersion}/build/pdf.worker.min.mjs`,
|
|
|
// 2. 本地备选:Vite 处理后的路径
|
|
// 2. 本地备选:Vite 处理后的路径
|