How optimize & reduce lib folder for WebViewer when installing though NPM or remove lib folder
Hi we are using PDFTRON for esign and webviewer and currently webviewer has large size (277 items, totalling 74.2 MB ) as it increases the build size. How can we reduce the size or place it on different place or remove it currently.
Is there any way we can initialize the webviewr without giving the public folder path or can we use directly from the node modules so that it reduce the build size?
import WebViewer, { WebViewerInstance } from ‘@pdftron/webviewer’
WebViewer(
{
licenseKey: process.env.NEXT_PUBLIC_PDFTRON_LICENSE_KEY,
// path: ‘/webviewer/lib’, (Need to remove this line or give path for some where else so that it reduce the build size)
fullAPI: true
}
As long as webviewer has access to the files when it loads, it should be fine, if you bundle your node_modules in a way that the WebViewer can access them that should be fine.