Socket
Socket
Sign inDemoInstall

svelte-pdfjs

Package Overview
Dependencies
69
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.6.2 to 0.6.3

6

CHANGELOG.md
# svelte-pdfjs
## 0.6.3
### Patch Changes
- feat: only render in ssr
## 0.6.2

@@ -4,0 +10,0 @@

9

package.json
{
"name": "svelte-pdfjs",
"version": "0.6.2",
"version": "0.6.3",
"engines": {

@@ -36,5 +36,8 @@ "node": ">=16.0.0"

"peerDependencies": {
"svelte": "^3.54.0",
"pdfjs-dist": "3.0.279"
"svelte": "^3.54.0"
},
"dependencies": {
"pdfjs-dist": "3.0.279",
"esm-env": "^1.0.0"
}
}

@@ -1,6 +0,7 @@

import { PDFWorker } from 'pdfjs-dist';
import { BROWSER } from 'esm-env';
import * as pdfjs from 'pdfjs-dist';
import { onDestroy, setContext } from 'svelte';
export function set_pdfjs_context() {
if (!import.meta.env.SSR) {
const worker = new PDFWorker({
if (BROWSER) {
const worker = new pdfjs.PDFWorker({
port: new Worker(new URL('pdfjs-dist/build/pdf.worker.min.js', import.meta.url)),

@@ -7,0 +8,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc