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'})
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'})
Share
Improve this question
asked Nov 18, 2018 at 11:12
Fabiano TaioliFabiano Taioli
5,5502 gold badges40 silver badges54 bronze badges
1 Answer
Reset to default 6According to this article "JS module support for shared workers and service workers is ing soon ..." https://developers.google./web/fundamentals/primers/modules
Also, its tracked in this issue: https://bugs.chromium/p/chromium/issues/detail?id=680046