Skip to content

Commit e4fb2b3

Browse files
author
ruszki
committed
Put sourceUrlComment to its own line
1 parent 83f772a commit e4fb2b3

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/EvalDevToolModuleTemplatePlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class EvalDevToolModuleTemplatePlugin {
2424
moduleFilenameTemplate: this.moduleFilenameTemplate,
2525
namespace: this.namespace
2626
}, moduleTemplate.runtimeTemplate.requestShortener);
27-
const footer = this.sourceUrlComment.replace(/\[url\]/g, encodeURI(str).replace(/%2F/g, "/").replace(/%20/g, "_").replace(/%5E/g, "^").replace(/%5C/g, "\\").replace(/^\//, ""));
27+
const footer = "\n" + this.sourceUrlComment.replace(/\[url\]/g, encodeURI(str).replace(/%2F/g, "/").replace(/%20/g, "_").replace(/%5E/g, "^").replace(/%5C/g, "\\").replace(/^\//, ""));
2828
const result = new RawSource(`eval(${JSON.stringify(content + footer)});`);
2929
cache.set(source, result);
3030
return result;

test/statsCases/chunks-development/expected.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Hash: 5ce1f032cffdff8368b5
22
Time: Xms
33
Asset Size Chunks Chunk Names
4-
0.bundle.js 431 bytes 0 [emitted]
5-
1.bundle.js 295 bytes 1 [emitted]
6-
2.bundle.js 584 bytes 2 [emitted]
4+
0.bundle.js 433 bytes 0 [emitted]
5+
1.bundle.js 297 bytes 1 [emitted]
6+
2.bundle.js 588 bytes 2 [emitted]
77
bundle.js 7.38 KiB main [emitted] main
88
Entrypoint main = bundle.js
99
chunk {main} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered]

0 commit comments

Comments
 (0)