Skip to content

Commit

Permalink
Update bundle_size.mdx for excluding pdfjs-dist optional dependency d…
Browse files Browse the repository at this point in the history
…ocs (#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]>
  • Loading branch information
abhimskywalker and khuezy authored Jan 27, 2024
1 parent 9a6473a commit 46241fe
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/pages/common_issues/bundle_size.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,17 @@ eg: `--arch=arm64 --platform=linux --target=18 --libc=glibc`

##### pdfjs

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.
- 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.

- If the above doesn't work (or gives some compilation errors) you can try:

```js
experimental: {
outputFileTracingExcludes: {
"*": ["node_modules/canvas"],
},
},
```

##### Others

Expand Down

1 comment on commit 46241fe

@vercel
Copy link

@vercel vercel bot commented on 46241fe Jan 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

open-next – ./

open-next-git-main-sst-dev.vercel.app
open-next.vercel.app
open-next-sst-dev.vercel.app

Please sign in to comment.