Back to Blog
Turbopack Boost
April 24, 2026·2 min read·4 views

Turbopack Boost

Next.js 15 with Turbopack and React Server Components, a winning combo

nextjsturbopackreactperformance

I've spent the last quarter optimizing our Next.js 15 app with Turbopack and React Server Components. What worked and what didn't - a deep dive. ## Turbopack Setup To get started with Turbopack, you need to configure it in your next.config.js file. Here's a basic example: ```js module.exports = { //... other config turbopack: { dev: true, production: true } }

For server components, you'll need to create a new file with a `.server.js` extension. For example, `Header.server.js`: ```tsx
import { Suspense } from 'react';

const Header = () => {
  return (
    <Suspense fallback={<div>Loading...</div>}>;
      {/* your component code */}
    </Suspense>
  );
};

export default Header;
```. ## Code Splitting
Turbopack supports code splitting out of the box. You can use the `import()` function to split your code: ```ts
const lazyComponent = async () => {
  const { default: Component } = await import('./Component');
  return <Component />;
};
```. Some benefits of using Turbopack include: * Faster build times
* Smaller bundle sizes
* Improved performance. Here are some key metrics to consider when optimizing your Next.js app: 
1. First Contentful Paint (FCP)
2. Largest Contentful Paint (LCP)
3. Total Blocking Time (TBT). > "The key to optimizing your app is to find the right balance between build time, bundle size, and performance". ## Looking Ahead
As I look to the future of our app, I'm excited to explore more features of Turbopack and React Server Components. One area I'm particularly interested in is using `React.memo` to optimize component re-renders: ```jsx
import { memo } from 'react';

const OptimizedComponent = memo(() => {
  // component code
});
```. ## Debugging
When debugging your Turbopack config, you can use the `--verbose` flag to get more detailed output: ```bash
npm run build -- --verbose
```. Finally, I'm looking forward to seeing how Turbopack and React Server Components continue to evolve and improve the performance of our app.