-
Notifications
You must be signed in to change notification settings - Fork 101
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
Reduce bundle size #125
Comments
We've already externalised Majority of the bundle is taken up by I don't think externalising When gzipped bundle size is ~127kb which of course you should be applying server-side. I actually think that's a fairly healthy size for the complexity of FreeDraw. It may also be worth considering dynamically async loadMap(textNode) {
textNode.innerHTML = 'We are loading the map...';
await import('./map-with-freedraw.js');
// voila...
} That way FreeDraw stays out of the your main bundle, and is only requested when actually needed. |
Thanks @Wildhoney for answering me. I currently have gzip compression. I'll load the module async with dynamic import and I'll keep following the project. Thank you! |
Hi,
I like very much this library! I'm building the library with webpack and the result file weight ~600 kb. Is there a way to reduce the bundle size?
Thanks for your suggestions
The text was updated successfully, but these errors were encountered: