Is it possible to use ES6 module imports in serviceworkers in latest Google Chrome?
I found this closed thread on w3c specs but it's not clear to me how to make it work on Google Chrome.
Tryied this but with no luck:
navigator.serviceWorker.register('/sw.mjs', {type:'module'})
According to this article "JS module support for shared workers and service workers is coming soon ..." https://developers.google.com/web/fundamentals/primers/modules
Also, its tracked in this issue: https://bugs.chromium.org/p/chromium/issues/detail?id=680046
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With