Do not include sourcemap files in Service Worker shell

Fixes #534
This commit is contained in:
Nolan Lawson
2018-12-16 11:46:44 -08:00
parent 02cef046aa
commit f97400caaa
17 changed files with 467 additions and 1 deletions

View File

@@ -116,10 +116,15 @@ export async function build({
let serviceworker_stats;
if (serviceworker) {
const client_files = client_result.chunks
.filter(chunk => !chunk.file.endsWith('.map')) // SW does not need to cache sourcemap files
.map(chunk => `client/${chunk.file}`);
create_serviceworker_manifest({
manifest_data,
output,
client_files: client_result.chunks.map(chunk => `client/${chunk.file}`),
client_files,
static_files
});