Web platform features explorer

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

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)

Developer 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.