Skip to content

Commit 8024a7d

Browse files
codehippie1actions-user
authored andcommitted
Sync root README and LICENSE with lib/
1 parent 6ada484 commit 8024a7d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,21 @@ Add PDF.js assets to your `angular.json`:
215215
- **Node.js**: 18.0+
216216
- **TypeScript**: 5.0+
217217

218+
### Production Deployment
219+
220+
#### Nginx Configuration
221+
222+
For production deployments using nginx, you may need to configure MIME types for PDF.js ES modules (`.mjs` files):
223+
224+
```nginx
225+
# Add to your nginx.conf or site configuration
226+
types {
227+
application/javascript js mjs;
228+
}
229+
```
230+
231+
**Why this is needed**: PDF.js v5+ uses `.mjs` files (ES modules). Without proper MIME type configuration, nginx serves these files with incorrect content-type headers, causing the PDF viewer to crash during loading in production environments.
232+
218233
### Angular Version Support
219234

220235
| Angular Version | Support Level | Notes |
@@ -498,6 +513,7 @@ export class MyComponent {
498513
| `borderRadius` | `string` | - | Border radius |
499514
| `customCSS` | `string` | - | Custom CSS styles |
500515
| `cspNonce` | `string` | - | CSP nonce for customCSS (optional) |
516+
| `iframeTitle` | `string` | - | Accessible title for iframe (optional) |
501517
| `showSpinner` | `boolean` | `true` | Show loading spinner |
502518
| `customSpinnerTpl` | `TemplateRef` | - | Custom spinner template |
503519
| `spinnerClass` | `string` | - | Custom spinner CSS class |

0 commit comments

Comments
 (0)