ES modules in the browser
The browser's built-in support for JavaScript modules via <script type="module"> and import/export. It lets you write modular code that runs directly in the browser without a bundler — the standardized module system for the web.
Background: before ESM, the web had no built-in module system — you glued together global scripts or used bundlers (webpack) and formats like CommonJS. ES modules (ES2015, widely supported in browsers since ~2018) are the standard: <script type="module"> enables module mode, and import/export work natively. Quirks in module mode: always run in strict mode, are deferred by default (loaded in parallel, run after parsing), run only once regardless of how many times they're imported, have their own scope (no global leaks), and require CORS for cross-domain imports. Together with import maps, dynamic import, and top-level await they make build-less development practical for smaller projects. Bundlers are still needed for large apps (optimization, tree-shaking, older browsers) but the platform can now do a lot itself. The basis for modern modular web JS. Related to import maps and dynamic import.