Skip to content

Commit 02e74c0

Browse files
committed
Add README server config section
1 parent c3919b7 commit 02e74c0

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,31 @@ const viewerApp = await viewer.initialize()
160160
viewerApp.open({ data: pdfData })
161161
```
162162

163+
## Server configuration
164+
165+
Since v4 PDF.js requires `.mjs` files support, make sure your server has it.
166+
167+
In case of `nginx` this may causes to errors, see https://github.com/mozilla/pdf.js/issues/17296
168+
169+
Add `.mjs` files support for `nginx` example:
170+
171+
```bash
172+
server {
173+
# ...
174+
175+
location / {
176+
root /usr/share/nginx/html;
177+
index index.html;
178+
179+
location ~* \.mjs$ {
180+
types {
181+
text/javascript mjs;
182+
}
183+
}
184+
}
185+
}
186+
```
187+
188+
163189
## License
164190
[MIT](http://opensource.org/licenses/MIT)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pdfjs-viewer-element",
3-
"version": "2.6.4",
3+
"version": "2.6.5",
44
"license": "MIT",
55
"author": {
66
"name": "Oleksandr Shevchuk",

0 commit comments

Comments
 (0)