Skip to content

Commit 5e84167

Browse files
committed
remove deprecated stuff
1 parent 7eb7529 commit 5e84167

2 files changed

Lines changed: 2 additions & 17 deletions

File tree

lib/SourceMapDevToolPlugin.js

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

lib/TemplatedPathPlugin.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,6 @@ const REGEXP_HASH_FOR_TEST = new RegExp(REGEXP_HASH.source, "i"),
1818
REGEXP_CHUNKHASH_FOR_TEST = new RegExp(REGEXP_CHUNKHASH.source, "i"),
1919
REGEXP_NAME_FOR_TEST = new RegExp(REGEXP_NAME.source, "i");
2020

21-
// TODO: remove in webpack 3
22-
// Backwards compatibility; expose regexes on Template object
23-
const Template = require("./Template");
24-
Template.REGEXP_HASH = REGEXP_HASH;
25-
Template.REGEXP_CHUNKHASH = REGEXP_CHUNKHASH;
26-
Template.REGEXP_NAME = REGEXP_NAME;
27-
Template.REGEXP_ID = REGEXP_ID;
28-
Template.REGEXP_FILE = REGEXP_FILE;
29-
Template.REGEXP_QUERY = REGEXP_QUERY;
30-
Template.REGEXP_FILEBASE = REGEXP_FILEBASE;
31-
3221
const withHashLength = (replacer, handlerFn) => {
3322
return function(_, hashLength) {
3423
const length = hashLength && parseInt(hashLength, 10);

0 commit comments

Comments
 (0)