Skip to content

Commit aff9984

Browse files
committed
Explicitly include assets to cache
1 parent a00dc99 commit aff9984

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/webpack.client.config.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ module.exports = (options = {}) => merge(
6666
}],
6767
})
6868
].concat(prod ? [
69+
// Exclude everything from the precache and add everything we want to be
70+
// cached at runtime.
6971
new GenerateSW({
70-
exclude: [/\.html$/],
72+
exclude: [/.*/],
7173
runtimeCaching: [{
72-
urlPattern: new RegExp("^(?!.*\.html)"),
74+
urlPattern: /\.(?:png|jpg|jpeg|svg|css|js|ttf|woff|eot|woff2)$/,
7375
handler: "StaleWhileRevalidate",
7476
options: {
7577
cacheName: "code-server",

0 commit comments

Comments
 (0)