Merge pull request #535 from nolanlawson/nolan/no-sourcemap-in-sw

Do not include sourcemap files in Service Worker shell
This commit is contained in:
Rich Harris
2019-02-01 05:34:20 -05:00
committed by GitHub
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
});