Member-only story
Hot Module Replacement, or HMR, can be found in many different languages and frameworks in software engineering to keep this article short the scope will be limited to HMR in webpack and, briefly, how it works with nest. For more information check out nestjs.com documentation on hot reload and webpack’s documentation on HMR
Nest.js
According to nestjs.com:
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
Under the hood, Nest makes use of Express, but also provides compatibility with a wide range of other libraries (e.g. Fastify). This allows for easy use of the myriad third-party plugins which are available.
Nest does most of its dirty work through annotations which gives it a feel similar to Java Spring. The most common use case for nest is quickly building a loosely coupled, scalable architecture using Typescript.
Webpack
Webpack is an open source JavaScript module bundler. At its most basic it bundles JavaScript files for use in a browser but…