From 57f293e872c02b5f98fb2339aaff70a096ea68a4 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 15 Dec 2017 18:37:08 -0500 Subject: [PATCH] dont cache shell/sw in dev --- connect.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connect.js b/connect.js index 7e7e791..cdf5758 100644 --- a/connect.js +++ b/connect.js @@ -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); }