JavaScript modules in workersBaseline · Widely available
The Worker() constructor accepts { type: "module" } to load scripts that use import and export. Also known as ECMAScript modules or ESM in workers.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jun 6, 2023. Widely available since Dec 6, 2025.
Browser support
DesktopChrome
1–79Not supported
80+Supportedsince Feb 4, 2020
Current: 155Edge
12–79Not supported
80+Supportedsince Feb 7, 2020
Current: 154Firefox
1–113Not supported
114+Supportedsince Jun 6, 2023
Current: 157Safari
1–14.1Not supported
15+Supportedsince Sep 20, 2021
Current: 27MobileChrome Android
18–79Not supported
80+Supportedsince Feb 4, 2020
Current: 155Firefox Android
4–113Not supported
114+Supportedsince Jun 6, 2023
Current: 157Safari iOS
1–14.5Not supported
15+Supportedsince Sep 20, 2021
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN — see the links below.
Feature detection
JS · check before using
if ("Worker" in globalThis && "Worker" in Worker.prototype) {
// Worker.Worker is available
}Specification
Sub-features
Support for each part of the feature (4). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Worker.Worker.ecmascript_modules | 80 | 80 | 114 | 15 | 80 | 114 | 15 |
| Worker.Worker.options_type_parameter | 80 | 80 | 114 | 15 | 80 | 114 | 15 |
| import.worker_support | 80 | 80 | 114 | 15 | 80 | 114 | 15 |
| import.worker_support | 80 | 80 | 114 | 15 | 80 | 114 | 15 |