Compare commits

..

3 Commits

Author SHA1 Message Date
Rich Harris
9eca90067c -> v0.0.20 2017-12-15 18:37:19 -05:00
Rich Harris
57f293e872 dont cache shell/sw in dev 2017-12-15 18:37:08 -05:00
Rich Harris
7e65c481d8 doh 2017-12-15 18:34:38 -05:00
3 changed files with 3 additions and 5 deletions

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);
}

View File

@@ -1,6 +1,6 @@
{
"name": "sapper",
"version": "0.0.19",
"version": "0.0.20",
"description": "Combat-ready apps, engineered by Svelte",
"main": "connect.js",
"directories": {

View File

@@ -103,8 +103,6 @@ const app = {
const a = findAnchor(event.target);
if (!a) return;
event.preventDefault();
// check if link is inside an svg
// in this case, both href and target are always inside an object
const svg = typeof a.href === 'object' && a.href.constructor.name === 'SVGAnimatedString';