Merge pull request #6973 from haggholm/master

#6971: Escape chunk names for webworkers
This commit is contained in:
Tobias Koppers 2018-04-09 08:01:36 +02:00 committed by GitHub
commit 510b68a828
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -24,7 +24,9 @@ class WebWorkerMainTemplatePlugin {
"// object to store loaded chunks",
'// "1" means "already loaded"',
"var installedChunks = {",
Template.indent(chunk.ids.map(id => `${id}: 1`).join(",\n")),
Template.indent(
chunk.ids.map(id => `${JSON.stringify(id)}: 1`).join(",\n")
),
"};"
]);
}