ES module
A JavaScript file that uses import and export to share code with other files, loaded in the browser with <script type="module">.
In more detail
ES modules are the standard module system built into JavaScript. In the browser, module scripts are deferred by default, run in strict mode and can use import maps to control where imports are loaded from.
Related terms
- import map — A JSON block in a page that tells the browser which URL to load when code imports a bare name such as 'lodash'.
- defer attribute — A script attribute that downloads the script in the background and runs it, in document order, only after the HTML has finished parsing.
- script element — The HTML element that loads or contains JavaScript for the page.
- JavaScript — The programming language of web browsers, also widely used on servers through Node.js.
Taught in
- Critical Rendering Path: Preload, Prefetch And Scripts — Frontend Architecture & Web Platform
- CSRF Mitigations, SameSite Cookies And Subresource Integrity — Frontend Architecture & Web Platform