JavaScript modules in service workers
The navigator.serviceWorker.register() method accepts { type: "module" } to load scripts that use import and export. Also known as ECMAScript modules or ESM in service workers.
Status
Limited availability
MDN documentation
Specifications
Browser support
- Chrome 91 Released on 2021-05-25
- Chrome Android 91 Released on 2021-05-25
- Edge 91 Released on 2021-05-27
- Firefox ❌ See bugzil.la/1360870
- Firefox for Android ❌ See bugzil.la/1360870
- Safari 15 Released on 2021-09-20
- Safari on iOS 15 Released on 2021-09-20
Baseline availability blocked since September 2021 by Firefox (51 months)
Web Platform Tests (WPT)
View the latest WPT test results for this featureDeveloper signals
Votes: 0
If you want this feature to be available in all browsers, vote for it by adding a thumbs up reaction (👍) to this GitHub issue, and leave a comment with more information.
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist