Skip to content

Commit 510b68a

Browse files
authored
Merge pull request webpack#6973 from haggholm/master
webpack#6971: Escape chunk names for webworkers
2 parents efade5c + 0f5ba64 commit 510b68a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/webworker/WebWorkerMainTemplatePlugin.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ class WebWorkerMainTemplatePlugin {
2424
"// object to store loaded chunks",
2525
'// "1" means "already loaded"',
2626
"var installedChunks = {",
27-
Template.indent(chunk.ids.map(id => `${id}: 1`).join(",\n")),
27+
Template.indent(
28+
chunk.ids.map(id => `${JSON.stringify(id)}: 1`).join(",\n")
29+
),
2830
"};"
2931
]);
3032
}

0 commit comments

Comments
 (0)