Minification and modules are techniques to improve JavaScript performance. They can both be used with vanilla JavaScript and with TypeScript
Splitting your JavaScript into small inter-dependent modules lets the browser load only what a page needs. Native ES Modules (import / export) are the standard way to do this today and are supported directly by modern browsers and bundlers. The older AMD format and its popular implementation RequireJS have largely been replaced by ES Modules.
✅ Pro: Only the modules you need are loaded
❌ Con: Requesting many small modules separately adds overhead, so bundle them for production
This is a server side technique that combines and optimises client side files into single, optimised downloads.
ASP.NET Core provides server-side bundling and minification support, as outlined here: Bundle and minify static assets in ASP.NET Core.
ASP.NET Core also supports bundling and minification through modern build tooling and bundlers such as webpack, Vite, or esbuild.
✅ Pro: Fewer Http requests and smaller files
❌ Con: All client side modules are included in a single download