2

I want to transpile a service worker source file so that it will work on browsers that support service workers. I can't use browserslist directly, because the scope does not accept a list of features to support. Caniuse can tell me which browsers support service workers, so is it just a case of manually listing the browsers in the scope like this?

"browserslist": [
  "Edge >= 17",
  "Firefox >= 44",
  "Chrome >= 45",
  "Safari >= 11.1",
  "Opera >= 32",
  "ios_saf > 11.3",
  "and_chr >= 84",
  "and_uc >= 12.12",
  "Samsung >= 4"
]

https://caniuse.com/#feat=serviceworkers

JoeTidee
  • 24,754
  • 25
  • 104
  • 149

1 Answers1

0

I am not sure what you mean by "I can't use browserslist directly, because the scope does not accept a list of features to support.". Which "scope" do you mean? It is supported to query browser features directly.

Example browserslist query for service workers: supports serviceworkers.

cascading-jox
  • 982
  • 1
  • 7
  • 21