Skip to content

Commit 5cbd2bd

Browse files
authored
Merge pull request webpack#4720 from arekkas/patch-1
Split sourceMappingURL string
2 parents 82ddd16 + c392f55 commit 5cbd2bd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎lib/WebpackOptionsApply.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ class WebpackOptionsApply extends OptionsApply {
206206
noSources = options.devtool.indexOf("nosources") >= 0;
207207
legacy = options.devtool.indexOf("@") >= 0;
208208
modern = options.devtool.indexOf("#") >= 0;
209-
comment = legacy && modern ? "\n/*\n//@ sourceMappingURL=[url]\n//# sourceMappingURL=[url]\n*/" :
210-
legacy ? "\n/*\n//@ sourceMappingURL=[url]\n*/" :
211-
modern ? "\n//# sourceMappingURL=[url]" :
209+
comment = legacy && modern ? "\n/*\n//@ source" + "MappingURL=[url]\n//# source" + "MappingURL=[url]\n*/" :
210+
legacy ? "\n/*\n//@ source" + "MappingURL=[url]\n*/" :
211+
modern ? "\n//# source" + "MappingURL=[url]" :
212212
null;
213213
let Plugin = evalWrapped ? EvalSourceMapDevToolPlugin : SourceMapDevToolPlugin;
214214
compiler.apply(new Plugin({

0 commit comments

Comments
 (0)