dont cache shell/sw in dev

This commit is contained in:
Rich Harris
2017-12-15 18:37:08 -05:00
parent 7e65c481d8
commit 57f293e872

View File

@@ -39,7 +39,7 @@ module.exports = function connect(opts) {
await compiler.ready;
res.set({
'Content-Type': 'application/javascript',
'Cache-Control': 'max-age=600'
'Cache-Control': dev ? 'no-cache' : 'max-age=600'
});
res.end(compiler.service_worker);
}
@@ -48,7 +48,7 @@ module.exports = function connect(opts) {
await compiler.ready;
res.set({
'Content-Type': 'text/html',
'Cache-Control': 'max-age=600'
'Cache-Control': dev ? 'no-cache' : 'max-age=600'
});
res.end(compiler.shell);
}