-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sw-cache snippet to the bottom of the template with fingerprinted path #96
Comments
Can you use an environment variable for the Btw, you need to specify |
I guess not. Webpack contains the information about the generated build file names, so I'd say this is a build-time decision. That'd be the same as manually updating my template before updating the server. The idea is to make it dynamic, or at least "at build time" decision.
It's true, this might solve part of the issue. Or even setting Max-Age to 0. The thing is, will this still be necessary if the sw files are fingerprinted? Shouldn't this cache invalidation mechanism suffice? |
Just thinking on this, if one were to cache their main |
Well, I guess that's an entirely different problem, which is out of scope here. Are you delivering the template as is? Are you rendering it through smth like express? Not the issue to address here |
BEFORE YOU SUBMIT please read the following:
webpack version:
2.5
sw-precache-webpack-plugin version:
0.9.2
Please tell us about your environment:
OSX 10.x
Current behavior:
I'm currently using sw cache plugin to load the sw cache worker. I'm following the instructions there (copy the snippet to the bottom of the page:
Expected/desired behavior:
Current behaviour is fine, but doesn't take advantage of contenthash resource names from webpack. Now, creating the fingerprint sw cache is easy, injecting it in the template is not. Is there a way to use webpack to inject the snippet with the proper production
"sw-cache.js"
path?My main issue with this is that, whenever I release a new version of a pwa app with new assets, loading the cached sw-cache is loading the invalidated set of assets.
The text was updated successfully, but these errors were encountered: