question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Path to appcache/sw.js

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
NekRcommented, May 27, 2016

Oh, there seems be a lot of typos in my previous comments. Just fixed them.

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 😃

Yeah, it was this way in v2 when publicPath was called scope (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 and publicPath, but I can do it only for v4 because I don’t want break people who uses v3. Semver, etc.

0reactions
zhouzicommented, May 27, 2016

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 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found