mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 03:05:12 +00:00
Merge pull request #525 from nolanlawson/nolan/sw-index-html
add service-worker-index.html
This commit is contained in:
@@ -45,17 +45,15 @@ export function create_serviceworker_manifest({ manifest_data, output, client_fi
|
||||
client_files: string[];
|
||||
static_files: string;
|
||||
}) {
|
||||
let files: string[];
|
||||
let files: string[] = ['/service-worker-index.html'];
|
||||
|
||||
if (fs.existsSync(static_files)) {
|
||||
files = walk(static_files);
|
||||
files = files.concat(walk(static_files));
|
||||
} else {
|
||||
// TODO remove in a future version
|
||||
if (fs.existsSync('assets')) {
|
||||
throw new Error(`As of Sapper 0.21, the assets/ directory should become static/`);
|
||||
}
|
||||
|
||||
files = [];
|
||||
}
|
||||
|
||||
let code = `
|
||||
|
||||
Reference in New Issue
Block a user