generate rollup and webpack templates from a single unified branch

This commit is contained in:
Conduitry
2019-01-20 12:14:58 -05:00
parent 1234971da5
commit 3f6a1c5f67
10 changed files with 203 additions and 42 deletions

View File

@@ -9,7 +9,7 @@
<figcaption>HIGH FIVE!</figcaption>
</figure>
<p><strong>Try editing this file (routes/index.html) to test hot module reloading.</strong></p>
<p><strong>Try editing this file (routes/index.html) to test live reloading.</strong></p>
<style>
h1, figure, p {

View File

@@ -2,7 +2,7 @@ import { timestamp, files, shell, routes } from '../__sapper__/service-worker.js
const ASSETS = `cache${timestamp}`;
// `shell` is an array of all the files generated by webpack,
// `shell` is an array of all the files generated by the bundler,
// `files` is an array of everything in the `static` directory
const to_cache = shell.concat(files);
const cached = new Set(to_cache);
@@ -42,7 +42,7 @@ self.addEventListener('fetch', event => {
// ignore dev server requests
if (url.hostname === self.location.hostname && url.port !== self.location.port) return;
// always serve assets and webpack-generated files from cache
// always serve static files and bundler-generated assets from cache
if (url.host === self.location.host && cached.has(url.pathname)) {
event.respondWith(caches.match(event.request));
return;