B4J Question [BANano] AddJavascriptFileSW on root and not on /scripts folder?

alwaysbusy

Expert
Licensed User
Longtime User
Could be an idea if it finds the service worker in the assets file, it does not create a new one but uses that one.

Of course in case of a PWA, this does also mean you will have to write the caching/REST API buffer calling etc... yourself in that service worker file. Which is not that simple to do: it is very easy to forget something and hence it does not work. Spend hours myself in the past when I did it manually searching why a PWA did not work because I forgot some stupid asset (could even be as simple as a picture). That is why BANano handles that for you as it does know everything that is needed by analyzing your code.
 
Upvote 0
Top