Skip to content

Commit d8a8bd3

Browse files
authored
deprecate string option instead of removing it
1 parent 07f6281 commit d8a8bd3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/SourceMapDevToolPlugin.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ class SourceMapDevToolPlugin {
2020
constructor(options) {
2121
if(arguments.length > 1)
2222
throw new Error("SourceMapDevToolPlugin only takes one argument (pass an options object)");
23+
// TODO: remove in webpack 3
24+
if(typeof options === "string") {
25+
options = {
26+
sourceMapFilename: options
27+
};
28+
}
2329
if(!options) options = {};
2430
this.sourceMapFilename = options.filename;
2531
this.sourceMappingURLComment = options.append === false ? false : options.append || "\n//# sourceMappingURL=[url]";

0 commit comments

Comments
 (0)