Skip to content

Commit ec30560

Browse files
committed
fix: add BASE_URL
Signed-off-by: Vitor Mattos <vitor@php.rio>
1 parent 29f1496 commit ec30560

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils/asyncReader.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { getDocument, GlobalWorkerOptions } from 'pdfjs-dist'
2-
GlobalWorkerOptions.workerSrc = '/pdf.worker.min.mjs'
2+
const PDF_WORKER_BASE_URL = process.env.VUE_APP_PDF_WORKER_BASE_URL || '/';
3+
GlobalWorkerOptions.workerSrc = `${PDF_WORKER_BASE_URL}pdf.worker.min.mjs`
34

45
/**
56
*

0 commit comments

Comments
 (0)