More Things I Learned Working on Very Slow Pages (JavaScript Edition)

A few months back I posted a list of page speed related links I’d collected while working on an extremely slow page and promised JavaScript and CSS related follow-ups. So here’s a start:

BundlePhobia
This is really handy for checking out how big your modules actually are.

babel-plugin-transform-react-remove-prop-types
If you’re using React, do you really need PropTypes in your production build?

Third Party Web
A nice rundown the usage and impact of popular third-party libraries.

How to Load Third-Party Scripts Dynamically in JavaScript
If you have to use one of the third-party libraries listed above, see if you can add it dynamically (can it be lazy loaded, is it used in a modal, etc.). This is a good tutorial that also gives an example for React.

Improving third-party web performance at The Telegraph
Another great article on third-party scripts. Especially enjoyed the parts about getting buy in from other teams and monitoring tag managers.

You Might Not Need Lodash
First, make sure you’re importing Lodash methods individually. Next, double check that you even need those methods now that ES6 is the norm.

You Might Not Need jQuery
Eventually getting rid of jQuery is the big dream at work.

You Might Not Need JavaScript
Honestly, can’t hurt.

Comments