4 ms·
Ask HN: What do you use for front end?
Hello HN,
A while ago after doing some research, I decided to go with VueJS for the frontend of a project I was working on but it feels very clunky and slow. The page size with all the libraries installed is nearly 8MBs.
I'm considering ditching our SPA all together building a flask app to interact with the backend with 0 javascript to reduce the page size and make it faster. I was wondering if there are any lightweight alternatives to Vue or know any good practices for speeding up the SPAs?
- eberkund 9y ago8 MB? What on earth are you including in your pages?
- Kpourdeilami 9y agoIt is a gigantic SPA using Vue, VueMaterial, and D3. It has around ~300 components. I don't know if it would be possible to lazy load some of the components
- christophilus 9y ago8mb is nuts. Is this the minified & gzipped size? Either way, code splitting and dead code elimination are your friends. I wonder if you're including multiple versions of the same libraries, or pulling in heavy libraries for only a handful of features? Is your code available somewhere for us to look at?
- Kpourdeilami 9y ago8mb is the local version of the code without gzip and minification. I just tested at the minified version and it is 2.5 megabytes
- johncoltrane 9y ago2.5 is still large. Some ideas: * split your application into several smaller ones, one for each "domain", with one bundle for your library code and one bundle for each "domain" * use CDNs instead of bundling third party libraries * make sure you import only what you use