Hot Module Replacement es Fácil

Bookmark
Rate this content

Aprende cómo funciona Vite's Hot Module Replacement (HMR) bajo el capó y todos los conceptos clave que lo impulsan.

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

Bjorn Lu
Bjorn Lu
11 min
16 Jun, 2025

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Bienvenido a JS Nation. Homework replacement, también conocido como HTML, permite actualizaciones de código sin recargar la página. Comprender HTML implica APIs, reacciones del servidor a ediciones de archivos y manejo de cambios del lado del cliente. El ciclo de vida de la API de HTML incluye adjuntar callbacks, desechar estados innecesarios y aceptar nuevos módulos. El manejo de cambios de archivos por parte del servidor, encontrar módulos relacionados y las decisiones de propagación de HTML determinan la ejecución del módulo y la recarga de la página. Los escenarios de propagación dictan actualizaciones de HTML dentro de los límites o recargas completas. La comunicación cliente-servidor a través de WebSocket gestiona recargas o actualizaciones de módulos.
Available in English: Hot Module Replacement is Easy
Video transcription and chapters available for users with access.

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

Vite: Repensando las Herramientas de Frontend
JSNation Live 2021JSNation Live 2021
31 min
Vite: Repensando las Herramientas de Frontend
Top Content
Vite is a next-generation build tool that leverages native ES modules for improved performance. It eliminates the need for bundling and improves hot module replacement. Vite provides an opinionated default configuration while still allowing advanced customization through plugins. It is framework agnostic and can be used for React and other applications. Vite is being adopted by Next.js and Create React App, and integration with Nuxt 3 offers significant speed improvements.
Bienvenido a Nuxt 3
Vue.js London Live 2021Vue.js London Live 2021
29 min
Bienvenido a Nuxt 3
Top Content
Nux3 has made significant improvements in performance, output optimization, and serverless support. Nuxt Bridge brings the Nitro engine for enhanced performance and easier transition between Nuxt 2 and Nuxt Read. Nuxt 3 supports Webpack 5, Bytes, and Vue 3. NextLab has developed brand new websites using Docus technology. Nuxt.js is recommended for building apps faster and simpler, and Nuxt 2 should be used before migrating to Nuxt 3 for stability. DOCUS is a new project that combines Nuxt with additional features like content modules and an admin panel.
10 Años de OSS Independiente: Una Retrospectiva
JSNation 2024JSNation 2024
33 min
10 Años de OSS Independiente: Una Retrospectiva
This talk is a ten-year retrospective into the growth of the Vue.js framework as an open-source project. It highlights the challenges faced by open-source developers, the importance of finding balance and managing scope, and the collaborative nature of the Vue community. The talk also discusses the development of Vite as a build tool and the vision for a unified JavaScript toolchain. It emphasizes the need for community alignment, contributions, and testing, while acknowledging the challenges of bad actors in the open-source community.
Qué hay de nuevo en Vite 6
JSNation US 2024JSNation US 2024
29 min
Qué hay de nuevo en Vite 6
Vite, a popular build tool for front-end development, has seen significant growth since its public release in 2021. It has been downloaded 12 million times and has over 1,000 contributors. Vite offers benefits such as a powerful dev server, hot module reloading, and a plugin API based on Rollup. However, there are limitations with server-side rendering that require extra code and handling of SSR flags. Vite's environment API allows for cleaner communication between the browser and server, and plugins can configure and customize specific environments. The future plans for Vite include stabilizing the environment API and integrating Rolldown Vite for faster builds. Vite is compatible with various front-end frameworks and is used by projects like Vaku and Vinci. The environment API has potential for per-local builds and building on older versions of Node, but may not be recommended for internationalization purposes.
El funcionamiento interno de la construcción de Vite
DevOps.js Conf 2022DevOps.js Conf 2022
31 min
El funcionamiento interno de la construcción de Vite
Welcome to vidBuild, a tool that optimizes your application for production by offering fast hodgemodule replacement and support for various technologies. The build process in vidBuild involves optimizing and minifying assets, bundling JS and CSS, and generating chunks for dynamic imports. The pipeline in vidBuild includes plugins for alias, resolution, CSS modules, and asset handling. Vid is a complete build tool with a flexible plugin system and support from a vibrant community. Vite's plugin API is compatible with Rollup, and Vite aims for simplicity while pushing complexity to the plugin system.
Vite y el Futuro de las Herramientas de JavaScript
JSNation 2025JSNation 2025
23 min
Vite y el Futuro de las Herramientas de JavaScript
Evan Yeo discusses Vite's growth, challenges with dependencies like ES Build and Rollup, and the creation of the bundler Rolldown. The JavaScript ecosystem faces fragmentation, but the company aims for a unified JavaScript stack. Rust is chosen for lower-level development, while JavaScript and TypeScript for high-level APIs. Roldown offers advanced bundling features, outperforming existing tools. Integration with Vite leads to tailored optimizations and significant speed improvements. Vite+ development focuses on creating a comprehensive toolkit. VitePlus integrates TS-down for library bundling, ViteTest for testing, and OX-Lint for linting. Future plans include monorepo awareness, build orchestration, and framework-like features.