Rethinking Bundling: Why You Don’t Need Less JavaScript

Bookmark
Rate this content

JavaScript represents a big part of page weight - and optimising for performance often requires trimming or optimising the bundle - albeit imperfectly. At the same time, bundlers have never been more important in full-stack JS frameworks. In this session we’ll be rethinking how bundlers can optimise JS, if we let go of some of our previous assumptions about what bundling means.

This talk has been presented at JSNation US 2025, check out the latest edition of this JavaScript Conference.

FAQ

Daniel is a full-time open source maintainer who works primarily on Nuxt, a full-stack framework for building web apps. He also contributes to Nitro, a framework for building servers, and works as a software engineer at Vercel.

Nuxt is a progressive full-stack framework designed to build web applications with minimal configuration. It allows for easy scalability and customization as needs change. It is community-driven and has been built by over 960 contributors.

Nuxt inlines CSS by tracking the components rendered on the server and combining their styles into a single inlined style block. This reduces file requests and layout shifts, improving initial load performance.

Nuxt includes optimizations like inlining CSS, improving interaction to NextPaint by delaying JavaScript execution, and reducing cumulative layout shift by managing web fonts more effectively.

Nuxt Scripts provides facade components for third-party embeds and offers built-in solutions like cookie consent and SSR support. It can also bundle third-party scripts to reduce third-party origin requests.

Nuxt 3 involved a complete rewrite to support Vue 3, Vite, and serverless architectures. Challenges included managing the extensive changes and communication with the community during the transition.

Nuxt offers tools like Nuxt Scripts for managing third-party scripts, E18E for cleaning up dependencies, and various modules for performance optimization, including handling web fonts and bundling.

Daniel encourages anyone interested in contributing to open source to get involved, offering support and guidance through platforms like Discord and providing the opportunity to book calls with him for assistance.

INP measures the response time to user interactions, and optimizing it can significantly enhance user experience. Nuxt addresses INP by implementing techniques to reduce JavaScript thread blocking.

Nuxt uses a module that extracts font families and manages their loading to minimize layout shifts. It ensures that fallback fonts closely match custom fonts to prevent visual disruptions.

Daniel Roe
Daniel Roe
30 min
17 Nov, 2025

Comments

Sign in or register to post your comment.
Video Summary and Transcription
The speaker, Daniel, shares insights on his role as an open source maintainer, projects Nuxt and Nitro, and living in Edinburgh. Nuxt, a full-stack framework, evolved with community support, emphasizing community-driven development. Optimization strategies for JavaScript, CSS, and font loading in Nuxt were discussed. Integration of Nuxt Scripts for web performance, challenges in meta framework development, and considerations for Nuxt V3 rewrite were highlighted. Future plans include smoother migrations and open-source access to emoji slides integration.

1. Introduction to Speaker and Topics

Short description:

The speaker, Daniel, discusses his role as an open source maintainer, his projects Nuxt and Nitro, and his experience as a software engineer at Vercel. He also shares insights on living in Edinburgh and invites interaction with emojis on screen.

Thank you very much. It is a pleasure to be here. Thank you for coming away from, let's be honest, the most incredible screen in the world. Have you ever been in such an amazing screen? No, I mean, it wrapped me. I was surrounded by that screen and captivated.

I'm going to be talking about rethinking bundling, and I apologize for the subtitle, because that's exactly what I'm saying. So I have lured you here under false pretenses, and it's not too late if you do want to go back to the planetarium. Because I'm not going to just say about why you don't need less JavaScript. Of course, well, that will come. But first, who am I?

My name is Daniel. I am a full-time open source maintainer, which I've got to say is the most incredible job in the world. I maintain Nuxt. I lead the team building that, which is a full-stack framework for building web apps. I'm also on the team building Nitro, which is a framework for building servers. I'll be talking a little bit about that tomorrow if you are at React Summit. I've also built a few websites and open source libraries that you might want to check out too, including magicregex, Fontaine. You can check your website on pagespeed.dev and so on.

Elk is a client for Masterdone. I'm a Google Developer Expert, Microsoft MVP, a GitHub star. And I recently became a software engineer at Vercel who employed me to continue my work on open source. I live in Edinburgh with my two cats and my family. This is basically a very beautiful view of the city. It is actually very beautiful. It is also very cold and very rainy, particularly as you go on into the winter. And as at least one of you has discovered, if you scan that QR code or go to a row.dev slash live, you can send any emoji on screen. I've given you some emojis to easily send, but you can also send any emoji if you want. So use that power with responsibility. No code of conduct violations, please. Cool. I think.

2. Interactive Features and Social Media Presence

Short description:

The speaker discusses building capabilities, connectivity to PartyKit, using WebSocket servers, and the simplicity of creating interactive features. They highlight their presence on various social networks except Twitter, welcoming direct messages and questions for assistance as an open-source maintainer.

Yes. Good. You've figured out how that works. Isn't it incredible, by the way, what we can build? This was not complicated. This is not me saying I could do amazing things. This is saying we can do amazing things. So here we are connecting to... This is built on PartyKit and on my website, which is all open source.

When you send an emoji, it goes to a WebSocket server hosted on CloudFlare, which is connected to my slides, which gets to display it on screen. That was absurdly simple to create. And we can just make anything we want. It's cool. When I was developing that feature, by the way, I got rickrolled because I made the mistake of posting on blue sky.

I should say I'm on every social network except Twitter for obvious reasons. Do feel free to connect. You can find my handles on my website, which is row.dev. Feel free to drop me a direct message any time or send me a question if I can help in any way. I'm an open-source maintainer because I love that. So don't feel bad about it. I would love to hear from you.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

The Core of Turbopack Explained (Live Coding)
JSNation 2023JSNation 2023
29 min
The Core of Turbopack Explained (Live Coding)
Tobias Koppers introduces TurboPack and TurboEngine, addressing the limitations of Webpack. He demonstrates live coding to showcase the optimization of cache validation and build efficiency. The talk covers adding logging and memorization, optimizing execution and tracking dependencies, implementing invalidation and watcher, and storing and deleting invalidators. It also discusses incremental compilation, integration with other monorepo tools, error display, and the possibility of a plugin system for Toolpag. Lastly, the comparison with Bunn's Builder is mentioned.
Rome, a Modern Toolchain!
JSNation 2023JSNation 2023
31 min
Rome, a Modern Toolchain!
Top Content
Rome is a toolchain built in Rust that aims to replace multiple tools and provide high-quality diagnostics for code maintenance. It simplifies tool interactions by performing all operations once, generating a shared structure for all tools. Rome offers a customizable format experience with a stable formatter and a linter with over 150 rules. It integrates with VCS and VLSP, supports error-resilient parsing, and has exciting plans for the future, including the ability to create JavaScript plugins. Rome aims to be a top-notch toolchain and welcomes community input to improve its work.
Server Components with Bun
Node Congress 2023Node Congress 2023
7 min
Server Components with Bun
Top Content
Bun is a modern JavaScript runtime environment that combines a bundler, transpiler, package manager, and runtime. It offers faster installation of NPM packages and execution of package.json scripts. Bun introduces a new JavaScript and TypeScript bundler with built-in support for server components, enabling easy RPC with the client. This allows for code splitting and running code that streamingly renders React or any other library from the server and mixes it with client code, resulting in less JavaScript sent to the client.
Challenges for Incremental Production Optimizations
JSNation 2024JSNation 2024
32 min
Challenges for Incremental Production Optimizations
TurboPack is a new bundle similar to Webpack, focusing on incremental builds to make them as fast as possible. Challenges in production builds include persistent caching, incremental algorithms, and optimizing export usage. The compilation process can be split into parsing and transforming modules, and chunking the module graph. TurboPack aims to achieve faster production builds through incremental optimization and efficiency. Collaboration and compatibility with other ecosystems are being considered, along with the design of a plugin interface and tree-shaking optimization.
Bundlers: A Deep Dive into Modern JavaScript Build Tools
JSNation 2025JSNation 2025
20 min
Bundlers: A Deep Dive into Modern JavaScript Build Tools
Edoardo, DevRel at Storyblok, explains the importance of JavaScript bundlers and discusses Storyblok's migration to Vite. Challenges with old JavaScript applications are illustrated, emphasizing issues with global variables and dependency control. Optimizing JavaScript module loading through ES modules is discussed, highlighting browser compatibility and performance concerns. The process of creating and structuring JavaScript bundles is detailed, focusing on dependency graphs and module organization. Techniques for managing bundle execution, utilizing abstract syntax trees for code parsing, and implementing optimization strategies are explored, with a specific emphasis on Vite, hot module replacement, and development enhancements.
Turbopack Persistent Caching
JSNation 2025JSNation 2025
29 min
Turbopack Persistent Caching
Tobias Koppers from Vercel TurboPack team discusses implementing persistent caching for long-term web application development, foreseeing significant growth in application sizes over the next decade. AI's role in code writing, TurboPack's vision for instant builds, challenges in build control, and the shift to incremental performance with caching for faster builds. TurboPack emphasizes making incremental builds fast and every build incremental, focusing on trustable and granular incremental builds, efficient granular cache handling in TurboEngine, and automatic granular cache invalidation. The system optimizes performance through efficient persistent cache integration, graph state persistence, database optimization, custom persistent layer creation, and optimizing build time efficiency. TurboPack stands out with its unique bottom-up caching approach, expansion to a general purpose bundler, and plans to enhance framework compatibility. Additionally, the comparison with ESBuild highlights the emphasis on incremental builds and detailed cache granularity with a token-based, almost AI-like approach.