Skip to content

Commit 4611def

Browse files
Merge pull request #579 from NotionX/fix/move-react-pdf-to-optional
2 parents 8c1cada + c78ead6 commit 4611def

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

packages/react-notion-x/package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@
6565
"react-hotkeys-hook": "^4.5.1",
6666
"react-image": "^4.0.3",
6767
"react-lazy-images": "^1.1.0",
68-
"react-modal": "^3.14.3",
69-
"react-pdf": "^9.1.1"
68+
"react-modal": "^3.14.3"
7069
},
7170
"devDependencies": {
7271
"@types/lodash.throttle": "^4.1.6",
@@ -76,10 +75,14 @@
7675
"clipboard-copy": "^4.0.1",
7776
"date-fns": "^4.1.0",
7877
"format-number": "^3.0.0",
79-
"lodash.throttle": "^4.1.1"
78+
"lodash.throttle": "^4.1.1",
79+
"react-pdf": "^9.1.1"
8080
},
8181
"peerDependencies": {
8282
"react": ">=18",
8383
"react-dom": ">=18"
84+
},
85+
"optionalDependencies": {
86+
"react-pdf": "^9.1.1"
8487
}
8588
}

packages/react-notion-x/tsup.config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ export default defineConfig({
1717
shims: false,
1818
dts: true,
1919
minify: false,
20-
sourcemap: true
20+
sourcemap: true,
21+
external: ['react-pdf']
2122
})

pnpm-lock.yaml

+14-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)