Skip to content

Commit 46241fe

Browse files
Update bundle_size.mdx for excluding pdfjs-dist optional dependency docs (#346)
* Update bundle_size.mdx for excluding pdfjs-dist optional dependency docs The current fix didn't work, but this updated fix did work for me. Hence proposing this as another solution. * Update docs/pages/common_issues/bundle_size.mdx Co-authored-by: khuezy <[email protected]> --------- Co-authored-by: khuezy <[email protected]>
1 parent 9a6473a commit 46241fe

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: docs/pages/common_issues/bundle_size.mdx

+11-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,17 @@ eg: `--arch=arm64 --platform=linux --target=18 --libc=glibc`
3333

3434
##### pdfjs
3535

36-
If you need to use pdfjs, you should install it with `npm i pdfjs-dist--no-optional` because the optional dep: `canvas` takes about 180MB.
36+
- If you need to use pdfjs, you should install it with `npm i pdfjs-dist--no-optional` because the optional dep: `canvas` takes about 180MB.
37+
38+
- If the above doesn't work (or gives some compilation errors) you can try:
39+
40+
```js
41+
experimental: {
42+
outputFileTracingExcludes: {
43+
"*": ["node_modules/canvas"],
44+
},
45+
},
46+
```
3747

3848
##### Others
3949

0 commit comments

Comments
 (0)