diff --git a/docs/pages/common_issues/bundle_size.mdx b/docs/pages/common_issues/bundle_size.mdx index ee2b65372..6132df44c 100644 --- a/docs/pages/common_issues/bundle_size.mdx +++ b/docs/pages/common_issues/bundle_size.mdx @@ -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