I'm new to web development and I'm using multiple libraries for different purposes on my site. Can using all these libraries slow down my site's speed ??? Thanks!
Libraries used:
- fontawesome
- Jquery
- animejs
- smoothScrool
- select2
- etc
I'm new to web development and I'm using multiple libraries for different purposes on my site. Can using all these libraries slow down my site's speed ??? Thanks!
Libraries used:
They could if you have a lot of them.
To mitigate some of these issues, consider consolidating all the libraries into a single script file that you bundle together using a module bundler like Webpack. In addition, make sure to use tree shaking to remove code that will never be used, and also minify the code for production so that the least amount of code needs to be sent over the network as possible. You can also consider waiting to load the non-essential libraries (like smooth scrolling) until the libraries required for the site to be functional are ready.