JavaScript modules in workers
Widely Available (since 2025-12-06)
The Worker() constructor accepts { type: "module" } to load scripts that use import and export. Also known as ECMAScript modules or ESM in workers.
Browser support
- Chrome 80 Released on 2020-02-04
- Chrome Android 80 Released on 2020-02-04
- Edge 80 Released on 2020-02-07
- Firefox 114 Released on 2023-06-06
- Firefox for Android 114 Released on 2023-06-06
- Safari 15 Released on 2021-09-20
- Safari on iOS 15 Released on 2021-09-20
MDN documentation
Specifications
- HTML (#dom-worker-dev), from HTML Workstream (WHATWG).
Usage (according to Chrome Platform Status)
~0.823% of page loads. More data at chromestatus.com.Web Platform Tests (WPT)
View the latest WPT test results for this featureInterop
- Included in Interop 2023
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist