KB1RD / matrix-notepad

A buggy way to collaborate on text documents using the Matrix protocol. When it works, consider this the Matrix Console of collaboration!
https://matrix-notepad.kb1rd.net/
GNU General Public License v3.0
67 stars 1 forks source link

The bundle is HUGE #9

Open KB1RD opened 4 years ago

KB1RD commented 4 years ago

All said and done, its around 24MB that gets sent to the client. This is insane. I really need to figure out where all this is coming from and eliminate it. I have a feeling that most of it comes from the UI framework that I'm using. I should import only the components that I need. First, I want to get this to a stable state though.

KB1RD commented 4 years ago

"You are using a whole package of antd, please use https://www.npmjs.com/package/babel-plugin-import to reduce app bundle size." -- Hopefully it'll be an easy fix

KB1RD commented 4 years ago

Moving this to the top because its just ridiculous.

KB1RD commented 4 years ago

Just to give a quick update: The NPM package that I linked had horrible docs (to the point where they had unanswered GH issues open asking how to use it), so I just bit the bullet and switched to Bootstrap Vue. This is probably a better long term decision since I can do things like support different themes easily. I also designed a custom theme called Glow for the editor. Even without any kind of tree shaking and while embedding all of the icons in the bundle, the result is about half the size from when I was using Ant.