File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -160,5 +160,31 @@ const viewerApp = await viewer.initialize()
160160viewerApp .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 )
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments