Skip to content

Commit 30b4db3

Browse files
committed
feat(pwa) make site work offline and respect SSG css
1 parent 2551b1f commit 30b4db3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

webpack.prod.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,10 @@ module.exports = env => merge(common(env), {
2121
},
2222
plugins: [
2323
new OfflinePlugin({
24-
relativePaths: false,
25-
publicPath: '/',
26-
caches: {
27-
main: [':rest:', ...cssFiles],
28-
optional: ['*.chunk.js']
29-
},
30-
externals: ['/']
24+
externals: ['/', ...cssFiles],
25+
AppCache: {
26+
FALLBACK: { '/': '/index.html' }
27+
}
3128
})
3229
]
3330
});

0 commit comments

Comments
 (0)