mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-22 07:05:24 +00:00
dont cache shell/sw in dev
This commit is contained in:
@@ -39,7 +39,7 @@ module.exports = function connect(opts) {
|
|||||||
await compiler.ready;
|
await compiler.ready;
|
||||||
res.set({
|
res.set({
|
||||||
'Content-Type': 'application/javascript',
|
'Content-Type': 'application/javascript',
|
||||||
'Cache-Control': 'max-age=600'
|
'Cache-Control': dev ? 'no-cache' : 'max-age=600'
|
||||||
});
|
});
|
||||||
res.end(compiler.service_worker);
|
res.end(compiler.service_worker);
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,7 @@ module.exports = function connect(opts) {
|
|||||||
await compiler.ready;
|
await compiler.ready;
|
||||||
res.set({
|
res.set({
|
||||||
'Content-Type': 'text/html',
|
'Content-Type': 'text/html',
|
||||||
'Cache-Control': 'max-age=600'
|
'Cache-Control': dev ? 'no-cache' : 'max-age=600'
|
||||||
});
|
});
|
||||||
res.end(compiler.shell);
|
res.end(compiler.shell);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user