goldhand/sw-precache-webpack-plugin

How to cache or exclude resources from another origin/cdn?

Findiglay opened this issue · 2 comments

I'm unaware if this is currently supported.

I have images in S3 with urls like:

http://[mybucket].s3.amazonaws.com/images/avatar.png

In offline mode, once these resources fail, then network requests to resources will continue to fail even once online. Is there some way I can exclude or (even better) include these resources so they cache properly?

Not exactly sure what was causing this issue for me but I applied the settings used in create-react-app and the issue is resolved.

see - https://github.com/facebookincubator/create-react-app/blob/e91648a9bb55230fa15a7867fd5b730d7e1a5808/packages/react-scripts/config/webpack.config.prod.js#L308

Does staticFileGlobsIgnorePatterns fit your use case?