I want to use this package but it's extremely large and is adding a lot of bloat to my bundle. Due to some office restrictions I'm not able to set up lazy loading/chunking via webpack at the moment.
I found a CDN for the above lib:
https://cdn.jsdelivr.net/npm/@react-pdf/renderer@1.5.3/dist/
But I'm not sure how to use it. Like which of these many files should I load? All of them? and will the exports that I was able to access before be available as variables on the window object?
I never loaded something I needed in a React component via CDN like this. Here's what the code looked like when importing the usual way:
import { pdf, Document, Page, Image, Link } from '@react-pdf/renderer';
<Document title="hello" author="world">
<Page style={styles.page}>
// etc...
</Page>
</Document>
How can I still use the lib if loading from CDN?