
Practical techniques for faster Nuxt apps
Reza Baar
July 15, 2026
Nuxt gives you a fast baseline out of the box: SSR, code splitting, and automatic prefetching. But there's a lot of room between "works fine" and "fast." In this post, we'll go through practical techniques that make a real difference and the tools to measure it all.
We covered routeRules in the deployment post, but it deserves mention here for performance. Caching rendered pages avoids the SSR cost on repeated requests:
// nuxt.config.ts
export default defineNuxtConfig({
routeRules: {
// Static pages: pre-render at build time
'/': { prerender: true },
'/about': { prerender: true },
'/pricing': { prerender: true },
// Blog posts: ISR with 1-hour cache
'/blog/**': { isr: 3600 },
// API responses: cache for 60 seconds
'/api/posts': {
cache: { maxAge: 60 },
},
},
});
Pre-rendered pages are served as static files from a CDN with zero server cost. ISR pages are rendered once and cached. API caching reduces database load for frequently accessed endpoints.
If you're importing from utility libraries, make sure unused exports are tree-shaken. Nuxt auto-imports are already tree-shaken, but manual imports from packages like lodash need the right import style:
// Bad: imports the entire lodash library
import _ from 'lodash';
const sorted = _.sortBy(items, 'date');
// Good: imports only sortBy
import sortBy from 'lodash/sortBy';
const sorted = sortBy(items, 'date');
// Also good: lodash-es is fully tree-shakeable
import { sortBy } from 'lodash-es';
const sorted = sortBy(items, 'date');
Check your bundle with npx nuxi analyze to see what's taking up space.
Fonts can block rendering if not handled correctly. Use @nuxt/fonts (auto-installed with recent Nuxt versions) or configure font loading manually:
/* Use font-display: swap to prevent invisible text */
@font-face {
font-family: 'Inter';
src: url('/fonts/inter.woff2') format('woff2');
font-display: swap;
}
Or with the Nuxt Fonts module:
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@nuxt/fonts'],
fonts: {
families: [
{ name: 'Inter', provider: 'google' },
],
},
});
The module handles preloading, subsetting, and font-display automatically.
Use these tools to see where your app stands:
Lighthouse in Chrome DevTools gives you Core Web Vitals scores (LCP, INP, CLS) and actionable recommendations.
nuxi analyze shows your bundle composition:
npx nuxi analyze
This opens an interactive treemap of your build output, showing which packages and components contribute the most to bundle size.
DevTools Network tab with "Disable cache" enabled shows the real waterfall of requests on initial load. Look for large payloads, sequential requests, and render-blocking resources.
Web Vitals Chrome extension or web-vitals npm package gives you real-time Core Web Vitals metrics as you browse your app.
Here's a summary of the highest-impact optimizations, roughly in order of effort vs. payoff:
@nuxt/image and convert <img> to <NuxtImg> with sizes and format="webp"pick or transform on useFetch/useAsyncData to reduce payload sizerouteRulesLazy prefix on below-the-fold componentsPromise.all instead of sequentiallynuxi analyze and fix tree-shaking issuesWe covered some practical techniques that move the needle on Nuxt performance: reducing payloads, and caching with route rules. These are small changes that add up to a noticeably faster app.
I hope this post has been helpful. Please let me know if you have any questions or comments. Happy coding!
Get the latest news and updates on developer certifications. Content is updated regularly, so please make sure to bookmark this page or sign up to get the latest content directly in your inbox.

Building Reusable Validators in Angular Signal Forms
Learn how to create reusable custom validators with Angular Signal Forms, with practical examples for building flexible and maintainable form validation.
Alain Chautard
Sep 29, 2026

A Reference to Composable Patterns in Vue
A catalog of practical patterns for writing composables that are flexible, predictable, and easy to reuse.
Reza Baar
Sep 23, 2026

AbortController: Cancellation and Cleanup in JavaScript
AbortController does more than cancel a fetch. Learn how one signal cleans up event listeners, times out requests, and combines with AbortSignal.any().
Martin Ferret
Sep 22, 2026