-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analyse and reduce the bundle size #137
Comments
This is how it looks like |
To clarify, I was talking about https://wikimedia.github.io/wikipedia-preview/demo/script/wikipedia-preview.production.js file. Its big share is dompurify. For example in the web page, https://diff.wikimedia.org/2021/07/29/new-wikipedia-preview-feature-provides-context-from-wikipedia-across-the-web/ this is one of the biggest javascript assets. |
@santhoshtr I'm curious about how you got those numbers (136k / 124k) from that production file. The only way I know how to measure those things is with Webpack bundle analyzer (see Huei's screenshot). That said, I would also like to remove DOMPurify. |
Currently the https://wikimedia.github.io/wikipedia-preview/demo/script/wikipedia-preview.production.js is about 142KB. Out of 142KB, about 136KB is dompurify library.
I see that DOMPurify is used for sanitizing the content from wikipedia. May be we need to check the trust model for the content too. If we can avoid bundling dompurify, then wikipedia-preview is just 5.4KB uncompressed.
The text was updated successfully, but these errors were encountered: