This one is incredibly simple, yet not quite easy to do.
Here are my 5 strategies:
- Use less transpiled code
- Split your code in separate bundles
- Enable a tree shaking and dead-code elimination build step, if you’re bringing in a lot of dependencies
- If using a modern framework, see if Ahead of Time compilation is available (AoT)
This piece is part of the #ASKTHEINDUSTRY project, a series of daily conversations with the Web Dev industry. You ask, I’ll answer, or find someone who can.