Last active
March 15, 2018 10:49
-
-
Save filipbech/2682f2793854e9bdf8de64765669aba2 to your computer and use it in GitHub Desktop.
Caching ES modules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const moduleRequests = ['app.js', 'module1.js'] | |
.map(url => new Request(url, { | |
mode: 'cors', | |
credentials: 'omit' | |
})); | |
cache.addAll([ | |
'index.html', | |
...moduleRequests | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment