The amount of JavaScript you ship to your users directly impacts your site’s performance. A smaller bundle size means faster initial loading times and an overall snappier experience for end users. In this post, I’ll show you how to analyze your SvelteKit bundle size and optimize it by moving heavy dependencies to the server. Analyzing Bundle Sizes Before we start, let’s set up a tool to visualize our bundle sizes. We’ll use rollup-plugin-visualizer, which works great with SvelteKit. I...