Hello. Has anyone had success in making progressiv...
# javascript
g
Hello. Has anyone had success in making progressive web apps with kotlin.js?
a

https://youtu.be/_AhTzpIQJTw

g
The main concern I'm having is how to generate a separate .js file for a service worker. Would it be possible to modify the webpack config to build the .kt file for SW separately from the main .js bundle file? Any ideas?
r
You can generate service worker by using
workbox-webpack-plugin
g
Can I freely modify the SW this way? Does it compile from kotlin? Right now, I just included a .js SW file in the resources folder
r
It doesn't let you freely modify SW. See https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin But it can be enough for many use cases.
👍 1