Path to appcache/sw.js
See original GitHub issueI am probably missing something but I can’t get to find how to configure the path to the appcache directory and sw.js file.
I have an express application serving assets at /assets
so the current structure looks like:
/assets
/appcache
/manifest.appcache
/manifest.html
/js
/app.js
/sw.js
The problem is that the runtime installation tries to fetch the manifest from /appcache/manifest.html
instead of /assets/appcache/manifest.html
. I tried to play around with publicPath but didn’t see any effects, same for relativePaths. I tried to pass options to the runtime function but after digging the code, seems like it’s completely ignored.
Is there a way to configure the appcache and sw.js path? Must it be located at the root?
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
How check is path is a app's cache path? - Stack Overflow
getCacheDir () Returns the absolute path to the application specific cache directory on the filesystem. Share. Share a link to this answer.
Read more >CacheStorage - Web APIs | MDN
The CacheStorage interface represents the storage for Cache objects. The interface: Provides a master directory of all the named caches that ...
Read more >Caching - web.dev
Cache storage is a powerful tool. It makes your apps less dependent on network conditions. With good use of caches you can make...
Read more >Caching in Node.js to optimize app performance
Learn about caching in Node.js apps using packages such as node-cache and Memcached to improve app performance.
Read more >How do I change the location of my cache/nocache HTML files?
The .cache.html and other files generated by the GWT compiler must be located at the same path as the .nocache.js file. It is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oh, there seems be a lot of typos in my previous comments. Just fixed them.
Yeah, it was this way in v2 when
publicPath
was calledscope
(don’t ask why 😃) and I changed behavior in v3, also no idea why, it just happened.I too think that it makes sense to revert to v2 behavior for
relativePaths
andpublicPath
, but I can do it only for v4 because I don’t want break people who uses v3. Semver, etc.That’s totally my fault. There’s often so much warnings when building a webpack project that I’m no more reading them. I read the documentation and seen the mention of the incompatibility of publicPath/relativePaths but didn’t pay attention to the fact that relativePaths is true by default and therefore disables publicPath. Maybe relativePaths should be ignored if there’s a publicPath provided (as it can only be intentional since there’s no default value) but really, that one is on me 😃
Thanks for your kind support 👍