mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
AAE-34470 Ignore content type of fetched pdfjs worker (#10818)
* AAE-34470 Ignore content type of fetched pdfjs worker * AAE-34470 Fix units * AAE-34470 Harness instances of pdfjs worker * AAE-34470 Harness instances of pdfjs worker * AAE-34470 Clean docs up * AAE-34470 Synchronize ngOnChanges * AAE-34470 Flush not tick * AAE-34470 Revert modern bundle for pdf_viewer.mjs
This commit is contained in:
@@ -186,10 +186,9 @@ npm install pdfjs-dist
|
||||
|
||||
```ts
|
||||
// PDF.js
|
||||
require('pdfjs-dist/web/compatibility.js');
|
||||
const pdfjsLib = require('pdfjs-dist');
|
||||
pdfjsLib.PDFJS.workerSrc = './pdf.worker.js';
|
||||
require('pdfjs-dist/web/pdf_viewer.js');
|
||||
pdfjsLib.PDFJS.workerSrc = './pdf.worker.min.mjs';
|
||||
require('pdfjs-dist/web/pdf_viewer.mjs');
|
||||
```
|
||||
|
||||
- Update the `plugins` section of the `webpack.common.js` file with the following lines:
|
||||
@@ -198,8 +197,8 @@ require('pdfjs-dist/web/pdf_viewer.js');
|
||||
new CopyWebpackPlugin([
|
||||
...
|
||||
{
|
||||
from: 'node_modules/pdfjs-dist/build/pdf.worker.js',
|
||||
to: 'pdf.worker.js'
|
||||
from: 'node_modules/pdfjs-dist/build/pdf.worker.min.mjs',
|
||||
to: 'pdf.worker.min.mjs'
|
||||
}
|
||||
])
|
||||
```
|
||||
|
Reference in New Issue
Block a user