Skip to content

Commit 2596b32

Browse files
committed
Prevent request names from breaking comments
Using `/*` as comment delimiters allows request names to terminate a comment early, like in carteb/carte-blanche#262.
1 parent 3580ec9 commit 2596b32

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

lib/ModuleFilenameHelpers.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,18 @@ ModuleFilenameHelpers.createFooter = function createFooter(module, requestShorte
101101
if(!module) module = "";
102102
if(typeof module === "string") {
103103
return [
104-
"/** WEBPACK FOOTER **",
105-
" ** " + requestShortener.shorten(module),
106-
" **/"
104+
"// WEBPACK FOOTER //",
105+
"// " + requestShortener.shorten(module)
107106
].join("\n");
108107
} else {
109108
return [
110-
"/*****************",
111-
" ** WEBPACK FOOTER",
112-
" ** " + module.readableIdentifier(requestShortener),
113-
" ** module id = " + module.id,
114-
" ** module chunks = " + module.chunks.map(function(c) {
109+
"//////////////////",
110+
"// WEBPACK FOOTER",
111+
"// " + module.readableIdentifier(requestShortener),
112+
"// module id = " + module.id,
113+
"// module chunks = " + module.chunks.map(function(c) {
115114
return c.id;
116-
}).join(" "),
117-
" **/"
115+
}).join(" ")
118116
].join("\n");
119117
}
120118
};

0 commit comments

Comments
 (0)